Friday, July 31, 2009

In C Programming, can you have a do while loop within another one?

are brackets closed as soon as they reach the next closing one or can you 'skip' a closing one so to speak?

In C Programming, can you have a do while loop within another one?
Sure you can. You can have as many loops as you like.





Nope, you cannot 'skip' a closing bracket. The compiler will complain - it won't be able to figure out what needs to be done. All your brackets must match and the closing one is matched with the immediately previous opening one.


So, you cannot have a scenario like the one below:





{ // Opening bracket 1





{ // Opening bracket 2





} // Closing bracket 1





} // Closing bracket 2





In any case, the system would interpret "Closing bracket 1" as "Closing bracket 2".
Reply:You can loops within loops, and if's within if's etc





while (someCondition)


{


do everything in the braces


while( some other Condition)


{


do everything in THESE braces


make sure condition to stop loop is here


}//inner while


make sure condition to stop loop is here


}//end outter loop
Reply:it is for loop ,maam its execution is also the same naaa
Reply:Braces close in the reverse order to which they open.





while (someCondition) {


do_something();


while (someOtherCondition) {


do_something_else();


}


do_another_thing();


}
Reply:Of course.

silk flowers

I would like to begin programming open source C++ code for Linux, where should I begin?

I have been programming in Visual C++, Dev C++ and other windows versions of code. I heard about the open source community and really like Knoppix and devices like Freenas and would like to begin making my transition into compiling and coding from within Linux, using the Gnu compiler stuff where should I begin looking?

I would like to begin programming open source C++ code for Linux, where should I begin?
I'm a computer science major at the university of louisiana at lafayette. Our computer lab that we write our programming assignments all have linux enviornments. Our introductory level course is taught in C++.





There are two main compilers that we use. one is the GNU compiler (g++). I'll reference the link for the website.





;-)
Reply:ummm C++ is the same on Linux and Windows.





Dev C++ uses the G++ compiler. So does the linux server I upload all my projects to at the school.





I write all my projects on DevC++ and run and test them on my computer. Then when I'm finished, I upload them to the linux box at the school and usually work. If they don't, it's usually a minor thing I need to fix that I forgot about. Like system("PAUSE");


I want to learn Java and C++ programming at home. Are there downloads available for these programs online?

Any suggestions of good sites to obtain downloads, free if possible.

I want to learn Java and C++ programming at home. Are there downloads available for these programs online?
I agree that Java or C# is going to be easier to learn than C++, but I don’t think that ease is the only factor. I think you need to find out what type of programming you want to do first. Web, application, game, networking, tools etc…Then pick a language. There are plenty of step by step tutorials for C++ that will make it easy to learn the basics just like with Java.





If you go with Java I would suggest downloading Eclipse, it is a free IDE and will make it easier for you to learn. For C++, I don’t know of any free IDEs, textpad will color the syntax for you, and digital mars has a free windows compiler. Borland has a cheap C++ IDE and compiler, about $40.





www.javaranch.com is a good resource for learning Java. If you chose Java I would also recommend after you get into it for a few months reading the java language specification, JLS spec and the java virtual machine specification JVM spec. For C++ this book is the specification:


The C++ Programming Language


by Bjarne Stroustrup








Bjarne invented C++. So he knows what he talking about, however you may not find the book that accessible when you are learning. But there are probably a lot of good tutorials, I’ve always found the o’rielly book to be an excellent source to learn from.
Reply:Search for tutorials





http://www.cplusplus.com/doc/tutorial/





That is a result from a yahoo search for C++ tutorial.





Hope that helps





RJ
Reply:java is easiest to get started with.
Reply:www.pekiyi.150m.com/c.html


www.pekiyi.150m.com/java.html
Reply:If this is your first time learning a programming language (which by the question, it sounds like it, no offense.) I would highly recommend starting with something like C#. You'll still learn OOP concepts but it's a newer language with better examples, and you will run into way fewer of the "gotchas" java/c++ are full of. You will be able to write just about any of the same kinds of apps you would with Java/c++. Microsoft also offers a free compiler: Visual C# Express. If you still have questions, email me.
Reply:the best website : freecomputerbooks.com u can search for tutorials and stuff...its fun


How to go for c#programming?

which is the good book to for software engineering and In c# how to go for User defined application?

How to go for c#programming?
The best C# tutorials are here:





http://www.tutorialdownloads.com/tutoria...





http://www.programmingtutorials.com/csha...





http://www.programmertutorials.com/


Can someone plz help me to work out this question in C programming...??

A small airline that operate flights to one destination use a computer system to:


1.Provide an enquiry system regarding the number and type of seats available for a flight on a specified day.


2.Issue a single ticket to a passenger containing the following information.


(i)Name of destination


(ii)Type of seat booked, i.e, first or tourist class


(iii)Departure, arrival times and date


(iv)Cost of ticket


(v)Name of passenger


3.Output a passenger list for each flight.





Assume the following:


(a)There is only 1 flight per day at different times over a period of 5 days. The airline operate from Monday to Friday only. The duration of the flight is 2 hrs.


(b)Every plane used has a maximum of 50 seats, the distribution of first class seats to tourist class being 10 and 40 respectively.


(c)A seat is bookable up to 1 week in advance but not on the day of the flight.


(d)The cost of the flight first class seat is $500, whilst that of a tourist class is $250.


Write this in C programming.

Can someone plz help me to work out this question in C programming...??
What part are you having trouble with? Surely you don't expect anyone to lay out the whole thing for you! (Well, maybe for US$50 per hour they would. :-)

purple flowers

How to open and compile a "C" Program in Visual Studio 2005?

I am new to programming environment. I have Visual Studio 2005 installed on my computer. I would like to know how to open and compile a basic "C" Program in Visual Studio 2005 IDE.


Thank you in advance.

How to open and compile a "C" Program in Visual Studio 2005?
If you already have a source code file, go to File menu, chose Open File, and select desired file. You can aslo select a project made in a previous version of Visual Studio. It must convert that file into a new project. Then if the source code is correct, there is a menu called Compile, go there and select Compile of Build. Then you have tu run the executable file.


What is the importance of C language programming today ?

Now-a-days, there is little distinction between C and C++, and in many contexts, C means just C++.





The original C language shaped the modern computer programming undoubtedly, and has com to a glorious retirement according to an article quoted below.





The contemporary C language, C++, is still going and has been (in conjunction with the original C) the mother or the main theme of many other languages: Java, JavaScript, PHP, C#...





I believe that one day in near future, C++ will also be retired the same way by a modern language C# which is the inevitable and natural spell of the original C language in future. Under these terms, how would one possibly evaluate the importance of C?

What is the importance of C language programming today ?
C is used when performance matters most. Largely in operating system kernels and kernel drivers. It is also used to write compilers like gcc.





While C has less "market" share than C++/Java/C#, it is still of critical importance as pretty much everything else relies on C in one form or another.


What all can I create with C or C++ programming language?

I was wondering if I could create games in C or C++? or what other languages can I make games out of? and what all stuff can I make with C or C++?





Thanks

What all can I create with C or C++ programming language?
c/c++ can create any thing u cud imagine of as a software


most of the games r in c/c++


operating system are in these languages


other programming language are on top of them


now imagine your self
Reply:You can create games in any C language
Reply:Most games today are built with C++... For making console games (e.g., on PS3, Wii, PS2) a popular choice is CodeWarrior or VIsual Studio.Net (e.g, XBox 360).





C++ with all its libraries and universal support and power, you can create anything (not just games). Another popular complement with C++ is DirectX or OpenGL...these are 3D libraries that assist in game development.





Havoc is another library that works in C++ that gives games Physics...virtually all popular games use this library. I have it on my computer when i develop and its great, but you could make your own if u wanted.





You can get CodeWarrior through a bitTorrent download site.
Reply:With a brick, cement and wood you can build almost anything. A building, a bridge, a tower, you name it. The question is how big the thing you want to build. You may need friends to help you, and off course: The knowledge.





So just like what I said above. With C and C++ you can build almost anything, including games. There are other languages that been used to build games like java, delphi and languages that the game developers made up themselves.





So with the right tool and knowledge, you can build or write anything you like. So the first question is not what you can build with them, but what do you want to build, then find the right tools and material. In this case, a PC with a codewarrior.
Reply:You can create anything in c or related languages if you are good at it.

pistil

What is the logic of sum of diganal matrix in the programming in c?

program of sum of diganal matrix in c lang.?

What is the logic of sum of diganal matrix in the programming in c?
int sumDiag(int* matrix, int rows, int cols)


{


int sum = 0;


int size = rows %26gt; cols ? cols : rows; //choose the smaller one





for(int i = 0 ;i %26lt; size; i++)


sum+= *(*(matrix +i) + i); //add each diagonal item





return sum;


}


What is the Best website for Pocketpc Programming+C#?

Pocket PC Programming is very much a subset of the embedded programkming environment that Microsoft set up. This means that you write apps on the PC, simulate them there or by upload to the PPC and debug with the two. Therfore, look for Embedded C++





http://www.pocketpcdn.com/





http://www.microsoft.com/windowsmobile/p...





http://msdn2.microsoft.com/en-us/default...





http://msdn.microsoft.com/windowsmobile/


How can I write a C program that will remove a certain icon from the desktop?

I want to write a program in C and compile that program on a floppy disk. I want that program to start as soon as the computer starts. I do not expect anyone to write that program for me. I just need some ideas to get started.

How can I write a C program that will remove a certain icon from the desktop?
Icons on your Desktop are just files on your Harddisk.


You can find them here:


C:\Documents and Settings\%26lt;username%26gt;\Desktop


and for all users in


C:\Documents and Settings\All Users\Desktop





Just write a simple consoleapp that deletes a certain file (your shortcut = icon) in that directory.





On the floppydisk edit the file autoexec.bat and place an entry that it starts your exe from the disk...


How do you open c++ to start programming?

Please stick to the point and dont give me history.

How do you open c++ to start programming?
You should have C/C++ IDE for doing that.
Reply:are u talking about how u install it and work or with the headers with which it will function ?
Reply:C++ is a programming language. You do not 'open'


it any more than you'd 'open' English. Are you talking about a particular peice of sotware that edits and compiles c++?

house plants

How do you find C++ programming language?

I find it by going to my start menu... up to programs.. over to my favorite c++ compiler.. run that.. knock on it's door.. and ask it to come out and play. (sorry vim users, i am past that phase of life).





outside of that I find it to be a good foundation language.

How do you find C++ programming language?
I "find" it difficult at best and C# was a nice migration.


Can anyone suggest a c# programming book designed for those already very proficient in C++?

What would interest me most would be a book that is broken down into the major concept chapters (ie, multimedia, containers, i/o, storage, network,etc) and that would actually do the example in unmanaged c++ and then in c# and explain the changes and how it all works. I truly feel that with enough examples like that, it would be easy to figure it out (rather than reading a C# book designed for beginners.)

Can anyone suggest a c# programming book designed for those already very proficient in C++?
try eBooks such as Wrox.


That's so prefect,so easy to learn and understand.
Reply:I don't really know a book like that, but here is a site where you can check.


Which is the best software for 'c' programming for xp.and also which is free of cost?

c programming software

Which is the best software for 'c' programming for xp.and also which is free of cost?
http://www.bloodshed.net/dev/devcpp.html





Its a decent C++ IDE I have used.


How to add color in a C programming language?? what is the syntax used??

can you give example on how to add color in my C programming language?

How to add color in a C programming language?? what is the syntax used??
here.....





#include %26lt;stdio.h%26gt;


#include %26lt;conio.h%26gt;





main()


{


clrscr();


textcolor (5);


cprintf ("The statement will have a color");


getch();


}





in textcolor(5)... the number inside the paremthesis corresponds to the color of your choice... i dont know what color is 5 but... im sure it has a corresponding color..





you must place the textcolor function above ur printf function





and your printf function must be changed to cprintf...





there... i hope it will help you..
Reply:i still don't get the point. Report It

Reply:Let's say i want to run a program that display " Hi how are u?" in red in color. How the code should be written? Report It


garden centres

What is a good free program to program C++ programs in Linux?

I want to program C++ programs, but I don't know what program to use.

What is a good free program to program C++ programs in Linux?
Any good text editor (not a word processor), like Vim or nano can be used to write the code and then you use gcc to compile.





HTH
Reply:Anything you like! You'll already have a host of tools installed such as vi, vim, kwrite, Eclipse etc.





If you're all too new to this, then maybe start off with KDevelop





http://www.kdevelop.org/
Reply:I've always used emacs and gcc.


C++ - How do i read/write text file in C++ programming??

Hi,





I was wondering if any programmers can help me out.





I am currently a student who is required to do a small project.


and one of the requirements is to read/write text file using C++ programming.








so, was wondering if anyone can help me out here....








is it possible for me to read in the text file and store every word in a array?








Like if my text file contains ::





John 14 Student


Peter 26 Engineer


Tom 20 Teacher








and i want to store them in the program like::





name[0]=john


age[0]=14


job[0]=Student





name[1]=Peter


age[1]=26


job[1]=Engineer





name[2]=Tom


age[2]=20


job[2]=Teacher








and to write them back into the text file...





haha is it possible??





hope someone can help ^^





thanks





-Oleo

C++ - How do i read/write text file in C++ programming??
Yes, its very possible. First you need to #include %26lt;fstream%26gt;


then declare an input and output file object like this





ifstream = inputFile; //input file


ofstream = outputFile; //output file





//declare the path of the file to be read


inputFile.open("%26lt;complete path to file%26gt;"); //path c:\text.txt


outputFile.open("%26lt;complete path to file%26gt;");





//then to read from the input file





inputFile %26gt;%26gt; //any variable can be put here, the inputFile %26gt;%26gt; works just like the cin %26gt;%26gt;





//then you can write back to the output file the same way





outputFile %26lt;%26lt; //whatever you want to output, it works just like cout %26lt;%26lt;





//of course this is just pseudo code but you could easily make it work with arrays by adding a for loop. for easier debugging, write the program first with all cin %26gt;%26gt; and cout %26lt;%26lt; statements. once it works that way, replace all the cin %26gt;%26gt; with intputFile %26gt;%26gt; and cout %26lt;%26lt; with outputFile %26lt;%26lt;





//one last thing make sure to close both files when you are done with them





inputFile.close();


outputFile.close();





//its just that simple! happy coding.
Reply:Surely, you can use C++ streams: operators '%26gt;%26gt;' and '%26lt;%26lt;' to write to and read from the file.


Though i write in C++ for a long time, for file input/output i still prefer good old plain C read/write and fscanf/fprintf. You can use any of these two pairs with the same result.


C Programming Language: How to implement the Fibonacci series using fork() system call?

output should display like this..


0,1,1,2,3,5,8...

C Programming Language: How to implement the Fibonacci series using fork() system call?
That is not efficient. You can rather use recursion to calculate Fib(n)
Reply:I need the answer


Linux C programming freeware?

Do you know of any Linux C programming language that I can use for programming? Is there a Linux C freeware that I download?

Linux C programming freeware?
Look at the GNU C Compiler.





See if you can install a package called gcc or g++ (for C++). They are both free.
Reply:Here you go...





Hitec PCC-Lite


http://www.htsoft.com/products/compilers...


Download


http://www.htsoft.com/downloads/getfile....





SDCC Small device compiler


http://sdcc.sourceforge.net/


Free C %26amp; C++ Compilers and IDE's


http://www.freebyte.com/programming/cpp/


Loads of freeware for Linux


http://searchenterpriselinux.techtarget....
Reply:devc++
Reply:I have found these solutions for you:


http://helplinux.altervista.org/english/...





and





http://helplinux.altervista.org/english/...





I hope these are usefull ;)
Reply:there are lots of free C++ editors and compilers available. Here's a link to one


http://www.freebyte.com/programming/cpp/





C++ can be used for both Windows and Unix (Linux) based Os's. A good compiler like Borland is very simple to configure so you can port your code to run on a wide variety of systems.





You might want to try Visual C first if your just learning. C++ is a high level complex language, and depending on what your intentions are, you may need to hunt down specific function library's to do what you want. I am partial to Borland, it's expensive to buy but has everything a programmer could ever need and is extremely well documented.

flower menings

In game programming, is C sharp the same as C++?

I'm trying to get into gaming programming and I've started to work with C sharp a tiny bit and I'm wondering if its the same as C++.

In game programming, is C sharp the same as C++?
No, they're different. C++ is an older language that was based on the older ANSI C language. C# is a fairly new language developed by Microsoft that runs off of their .Net platform.


While the basic principles are the same, there are some deeper differences that exist between the two. If you are planning on developing a windows application (using a graphical form and controls) I suggest using C#. In my experience (using both of them) C++ is best for less-graphical applications (more like data processing and stuff like that)
Reply:No, they are very different. C# requires the .Net framework, C++ doesn't. C# has automatic memory management (which in games can be a REAL hassle), C++ has manual memory management.
Reply:Both programming have different syntax but some of it is still the same. On the other hand, the programming semantics of both programming language is same and can be apply by both.


Would you agree that C# is the best programming language?

C# and Java do have similar programming style, and i think the said style is the best. But Java is so slow. Other languages (C, C++, Assembly) seem hard to understand. Now I wonder about your suggestions.

Would you agree that C# is the best programming language?
I really love C#. I think it beats Java out of the water any day. It is the best language to write most applications in for the windows platform.
Reply:I like "icnintel" Answer; I'm a fan of C# my self, but I'm also in love with Ruby and a loyal to C++ and finally an admirer of Java!


Security -%26gt; I believe J2EE should be your first choice


Talk to hardware -%26gt; C, Assembly


Fast processing -%26gt; C,C++,Ruby


Text Manipulation -%26gt; Perl, Ruby


Memory Management -%26gt; .NET, Java


XML Manipulation -%26gt; .NET


Platform Independency -%26gt; Java


.


.


.


It depends on your project and there is the "most suitable language for a particular project"
Reply:It is impossible to choose a best programming language. It depends on the task you have at hand.
Reply:For me it depends on what language is the most suitable for your planned applications.
Reply:There is no best programming language. It depends on your project.
Reply:yah c++ is better than java,bcoz if u know abt c then it is easy to write programs using c++ also,but it is not in case of java in order to write programs in it hav to gain sufficient knowledge.
Reply:if u think java is is slow....i think u dont know what java is. try work out some java project then u will know. and C# is nothing but Some what copy of Java
Reply:yes I agree .


c# have a colliction from all programing language

blue flowers

What program do i use for writing and testing and compiling C programs?

I've forgotten the program we used to write C programs. i need to be able to write, test, compile and debug programs written in C programming language... what's the program to use?

What program do i use for writing and testing and compiling C programs?
microsoft's visual c++
Reply:www.cprogramming.com/


www.cyberdiem.com/vin/learn.html


www.math.utah.edu/~beebe/software/c-to...





Here's a few to get you started
Reply:Codeblocks is a great easy and free IDE





Visit http://www.codeblocks.org/
Reply:Don`t bother with visual studio if you are a begginer. It`s a great tool definitely the best, but i think something simpler would be more convenient for you


It`s called DevCpp from Bloodshed. Its an easy to use IDE, with samples, and It`s 100% free.


Is there any C++ programming competition for kids?

My 9 year old is into C++ programming. Is there any competition for kids?

Is there any C++ programming competition for kids?
I doubt that there is such a competition. Yahoo Answer may not be the best place to find the answer. Check out google group http://groups.google.com/group/comp.lang...








Anodizing 101: Opportunities are never lost. The other fellow takes those you miss.








Torrey Hills Technologies, LLC


http://www.threerollmill.com


http://www.torreyhillstech.com


http://www.anodizingracksonline.com


http://www.beltfurnaces.com


How to write a c program that chooses 3 out of 5 largest numbers?

Hi everyone! I was wondering if you could help me write this C program. I've spent a lot of time on it and I can't think of anything good. Hints would be appreciated as well :D





"Write a complete C program that will ask a user for 5 integer numbers and will print out on the screen the three largest. "





Thank you!

How to write a c program that chooses 3 out of 5 largest numbers?
no offense, but this is very basic. This has little to do with C language, you need to think on how to figure out which is the largest numbers. This is more of an exercise on how you can think logically than it is programming.





You need to do a comparison, and the largest number needs to be held and then compared against the others. Once you figure out the largest, you do a comparison with the 4 remaining, until you have the 3 largest.
Reply:I'll leave the actuall coding to you, but for the logic, you'll want to store them into an array of ints, run them through the sort routing of your choice (knowing it's only 5 elements means you can use any method, even the brute force methods, and it will be pretty cheap), then output elements 0-2 (or 2-4, depending on how you sort) of the array.
Reply:Define four integers. One for Input, a Largest, Second and Third.





I would initialize them all to zero because it's Hip, Modern, and you never know what garbage is lurking in your memory unless you watch old episodes of Reboot.





Repeat five times:





Get the Input number.





Compare it to Largest.





If Input is bigger than Largest


swap Third and Second


swap Largest and Second


swap Input and Largest


Else if Input is bigger than Second


swap Third and Second


swap Input and Second


Else if Input is bigger than Third


swap Input and Third


Else do nothing.





End Repeat five times.


Print Largest, Second and Third.


End program.


Anyone know a GOOD book for C++ programming?

I need a good book for learning C++. I am in C++ Programming II in college and certain things I have trouble grasping and the text we use sucks.

Anyone know a GOOD book for C++ programming?
When it comes to programming books, O'Reilly is pretty much the gold standard:


http://www.oreilly.com/pub/topic/cprog





But if you're on a budget, you can find a dozen or so free on-line books on C++ programming here:


http://www.freeprogrammingresources.com/...
Reply:ivor horton's

white flowers

How to check if a number is odd or even without using the modulus in c programming?

I assume that your number is an integer. Easiest is to use the bitwise "and" operation:





if ((x %26amp; 1) != 0) printf ("x is odd\n");





------------------


The questioner asked for further detail in email, so:





Well, if this is about an exam, I'm sure that they've covered bit operations in C.





C = A %26amp; B; means AND all of the bits of A and B together. Each bit in C is set if and only if both corresponding bits are set in A and B.





C = A | B; means OR all of the bits of A and B together. Each bit in C is set if either corresponding bit is set in A and B.





C = A ^ B; is an "exclusive OR" (XOR). Each bit in C is set if the corresponding bits bits in A and B are different.








So, in my original answer the result of the expression (A%26amp;1) will have 0's in all but the lowest bit. The lowest bit will be equal to the lowest bit of A.





And in binary, any even number has a lowest bit equal to zero, and any odd number has a low bit equal to 1. (It's kind of like in decimal, that any number divisible by 10 has a last digit of 0.)





There are other ways you could have done this, such as:





if ((a/2)*2 == a) printf ("a is even\n");





but the %26amp; example is much more efficient.





Good luck.

How to check if a number is odd or even without using the modulus in c programming?
if (x/2)=round(x/2) then even else odd?





I guess that would work.


C Programming: How do you calculate the average in a loop?

hi guys, i just want to ask something about this program im making for my assignment.





im supposed to make a program that will display numbers 10 to 100 with intervals of 10, in the left column and the profit(5% of the sales) on the right column. after the loop ends, the average of the sales should be displayed at the bottom. and my question is... whats the code for calculating the average of the loop?





here's my code:





#include %26lt;stdio.h%26gt;





void main()


{


float sales, avg;





printf("Sales Projection (in thousands).\n\n");


printf("\tSales\tProfit\n");





for (sales=10;sales%26lt;=100;sales+=10)





{


printf("\t$%.f\t$%.2f\n",sales, sales*0.05);


}





printf("\n\tAverage Sales: $%.2f", avg);





}








any help would be very much appreciated ^^

C Programming: How do you calculate the average in a loop?
The average is the sum of the items divided by the number of items. But you knew that.





Declare a variable to hold the sum and initialize it outside the loop





float, sales, avg, sum;





sum = 0;





While you are printing out the sales, keep a running total inside the loop





sum += sales;





after the loop, calculate the average





avg = sum / 10;





In the more general case, you'd know beforehand or calculate how many items you added up, and you'd divide by that instead of by the constant 10.
Reply:Use below code


#include %26lt;stdio.h%26gt;





void main()


{


float sales, avg=0.0;





printf("Sales Projection (in thousands).\n\n");


printf("\tSales\tProfit\n");





for (sales=10;sales%26lt;=100;sales+=10...





{


printf("\t$%.f\t$%.2f\n",sales... sales*0.05);


avg+=sales;


}


avg/=10;


printf("\n\tAverage Sales: $%.2f", avg);





}


C Programming: How can I count Decimal Places!?

My program uses scanf to take the value of a floating number. The problem is, I want it to also tell how many decimal points there were in the number.





For example, let's say someone inputs in 2.34. I want my program to know that there are 2 decimal places, as well as store the value of 2.34 as some variable.





Any bright ideas?

C Programming: How can I count Decimal Places!?
I would use sprintf() to convert it from a float to a string and then search the string for the decimal and count the digits after it.
Reply:1. First, convert your floating point number into integer. i.e. 2.34 --%26gt; to 2.





2. Subtract the integer from the floating point number. i.e. 2.34-2=0.34.





3. Multiply the difference by 10. ==%26gt; 0.34*10=3.4 parallely increment the counter say i=1.





4. Go to the step one. Repeat until the difference turns out to be zero.
Reply:convert to string,


subtract the location of the decimal point in the string from the length of the string


I am a beginner who has the basic nack of programming in C,I want to learn Adobe CS 3 to build websites ??

I want to build a highly interactive website , and I searched for the Proffessional web building tools on the net and came across Adobe Creative Suite 3 Web Premium, but the problem is I just have a little knowledge on web building and a little programming experience in C and Java (Core) .So I wish to know that where would I find a good from scratch tutorial , that would teach me using the above product preferably a Video tutorial, also tell me that is it possible for me to learn it or I would have to learn other things first in order to learn the adobe CS3 ???


Thankyou !!!!!

I am a beginner who has the basic nack of programming in C,I want to learn Adobe CS 3 to build websites ??
First thing Adobe CS3 is not web development program its an image manipulation s/w and I'll be extremely useful while development. Second U've to learn web languages to make website u want. These are HTML, ASP, DHTML, CSS, "JAVASCRIPT", XML, AJAX[JS + XML]. Flash, Photoshop.





C has no use here, but y! JAVA is good choice, I'll be helpful in creating Java Applet applications.





First go for Photoshop play with tools and filters here, don't try to create anything... i mean to say JUST Play n enjoy painting.. After become familier with Some of tools, start using extra features.


Tip:: Java has a hard competitor Adobe Flash. This s/w is miracle and changed many websites future. Java respond some slowly 'coz of its well known BEST Feature which u hear everytime.... Plateform... :)





Go for Languages i told u above, then Photoshop and Flash.. And and Learn JScript as much u can. It's the only language u 'll use to build Interactive website [except if u r not using Flash].





Here is one s/w also Adobe Dreamweaver, specially for website developemnt, which is for those who don't know or don't want to learn languages. ;)





http://www.w3schools.com


Gud Luck n


Have a nice Coding. :)
Reply:Hello pankitdhawan,





You mean Adobe DreamWeaver. You don't really need to get the whole suite of CS3 programs. Adobe publishes "Classroom in a Book" for DreamWeaver, that could be of great help to you. Start there.





Best of luck to you.





--Rick

song lyrics

In C programming how to convert numbers into Indian number names?

If the input is a number (with any number of digits ,atleast six) how do u convert it to number name in the indian system?Ex: 47589 should yield an output like forty seven thousand five eighty nine.I need the simplest program possible..

In C programming how to convert numbers into Indian number names?
You should first get the number as a string using sprintf().





Once you have the string you should make a function that takes 2 parameters: A digit, the place of that digit in the number.





This function should return the right string of the number.


on your example: given 4 as the number %26amp; 5 as the place it should return the string 'forty' but if the place was 1 then it should return 'four'.





To help this function out you can make 2 other functions:


getNumberAsTens()


getNumberAsUnits()





Those return the different 2 strings of a digit


ex: Given 4 The first return 'forty' and the second return 'four'





Those 2 functions are for the first function to use.


Each of those 2 functions is basically one big switch case that takes the digit and return the string according to the value.





Then you should construct your final string by adding the words 'Thousands', 'hundreds' etc.. to make the final answer correct.





You will need to test all special cases to make sure you get them right like 100000 for example.
Reply:// Try something like this


//Brute force but simple:


//Create a table of strings


string s1[ ] =


{"zero";


"one";


...


"nine hundred ninety-nine"


};





Create anouther table of strings


string s2[ ] =


{"";


"thousand";


"million";


...


};





//Start with your number, n.





If( n == 0)


{


//output "zero".


// done


}











Otherwise,


int t = 0;





string OutputString;





while( 0 %26lt; n)


{


int r = n%1000;


if( r !=0)


{


OutputString =+ s1[r] + " " + s2[t] + OutputString;;


n = r;


t++;


}


}


File conversion software in C programming language?

How can i make a software (in C) for my term project which can convert bmp file to ocx file and ocx to bmp?

File conversion software in C programming language?
That is going to be quite difficult. If you are still stuck with your project assignment may be you can contact a C expert live at website like http://askexpert.info/


C Programming: How do I set one pointer to a structure equal to an existing one?

If you just want Action to point to Enemy, you do:





Character *Action;





Action = Enemy;





If you want a real copy you need to reserve memory for Action and do the copy like this:





Character Action;





memcpy(%26amp;Action, Enemy, sizeof(Character));

C Programming: How do I set one pointer to a structure equal to an existing one?
Don't do it! Use a variable instead. I had to virtually offer a colleague violence when he insisted making the "pointer to a pointer" thing work, he was at it for 3 days. It took him 45mins with a variable once he saw the light. You've got buckets of memory these days, use it.
Reply:No problem


typedef struct


{


int a;


int b;


}myType;





myType *x;


myType *y;





x = (myType *)malloc(sizeof(myType));


y = (myType *)malloc(sizeof(myType));





x-%26gt;a = 3;


x-%26gt;b = 5;





*y = *x;





that will copy all of the x data into the y memory.





Your example has:


*Enemy = *Action;





That's backward, you haven't assigned Action yet.


Also you haven't given it memory to Enemy or Action.


you need to malloc space for both.





The other poster is correct too. You can either copy the


structure using the derefernce "*" or using memcpy.





Oops, sorry you're just assigning the ptr for Enemy still need memory for action.





---


just did this in Visual Studio express, it works fine:





#include "stdafx.h"


#include "string.h"


#include "stdlib.h"





typedef struct Man {


char Name[31];


int Number;


}Character;








int _tmain(int argc, _TCHAR* argv[])


{


Character Bob;


Character *Enemy;


Character *Action;





Bob.Number=110;


strncpy(Bob.Name, "Bob", 31);





Enemy=%26amp;Bob;





Action = (Character *)malloc(sizeof(Character));





*Action = *Enemy;





return 0;


}
Reply:Try here for info


http://www.techtutorials.net/





http://www.rickmaybury.com/





http://www.theeldergeek.com/


http://www.good-tutorials.com/


http://www.digitaljuice.com/


http://www.tutorialkit.com/


http://www.codestyles.com/


http://www.sitecube.com/website/promo_bw...


What are the relevances of C++ programming language in electrical/electronic engeering?

what are the relevances of C++ programming language in electrical/electronic engeering and in engineering as a whole

What are the relevances of C++ programming language in electrical/electronic engeering?
I guess i can put my input or what i think regarding this issue. The relevances are probably because C++ is a lower level language it can read numbers or transfer data at a binary level a lot better, which in turn helps out computer electronic boards because of the way logic gates work. Which are electrical switches that either transfer a 1 or a 0 to make a binary number that is 4 digits long to express a certain character therefore creating data. Some languages, such as high level languages like VB may have a lot harder time performing this task because in order to compile the programming language it takes it down to basic binary but it takes quite a while to turn high level languages into binary and get them to run perfectly. In fact it is sometimes hard for any program to run perfectly but with C++ its on such a basic level you dont really have any problems and if you do you can easily pick it up be it a logic error or an actual compiler error. So to sum it up i would say C++ is a lot more relevant cause it is on a more basic, binarly level with the logic gates than other languages that exhist.





/kevin
Reply:C++ IN NOT A LOWER LEVEL LANGUAGE! it just happens that it has been around for a while and ws one of the first languages to implement OOP concepts and so is vastly used int he industries- it has a lot of importance in rogramming chipsets, gra[hics cards etc -i guess thats your answer
Reply:Well are you going to make a C program [C++ or C--] or what





To make C programs==


1.Use Visual C++ or C-- or use your text editer.


Note that if you use a text editer,you must skip 2,3 and 4.


2.[Visual C++ or C--]Go up to File and New...


3.[Visual C++ or C--]Select Applaction and click OK.


4.[Visual C++ or C-- Code]Edit the applaction,and it's options.


5.[Both]Using a text skip this.In Visual C++ or C-- go to File and Save As... and save the applaction.


6.[Text]Edit the applaction,and it's options.


7.[Text]In Visual C++ or C-- go to File and Save As... and save the applaction.

savage garden

In c programming language how do you write a while loop code that does not accept any letters, only numbers?

Calculator Program in C language.

In c programming language how do you write a while loop code that does not accept any letters, only numbers?
You will need to check your input characters as they are read.





Do something like this:


char inchar = '0';


while(inchar %26gt;= '0' %26amp;%26amp; inchar %26lt;= '9')


inchar = getche();


Does anyone know how to do the basic C serial port programming, and if you can explain it to me please do.?

Does anyone know how to do the basic C serial port programming, and if you can explain it to me please do.

Does anyone know how to do the basic C serial port programming, and if you can explain it to me please do.?
http://www.beyondlogic.org/serial/termpo... The first half of the program sets up the SIO registers and the second half looks for received data.


How can you make a C program that can create a windows file folder? Is it possible?

C programming codes for a program that can create a file folder. please help...this is part of our project in the finals...

How can you make a C program that can create a windows file folder? Is it possible?
For windows, use "CreateDirectory." Look on the MSDN web for complete usage. It should also be on your VS local help.
Reply:look into using the exec command to execute the shell and create it for you.(depends on the OS the program is running on)


The use file streams to create files and etc


Can u tell me please about the advanced c programming in graphics , system programming & other applications?

i want to know the application of c pragramming in Graphics,system programming such as system calls , in designing GUI based prorgamming using C so please help on that point or tell me the link where i can find it

Can u tell me please about the advanced c programming in graphics , system programming %26amp; other applications?
Look, that is a general question. You can even get a good answer in almost any good college catalog. C as a language evolved during an important transitional period in the development of computers, and while -- technically -- Unix started first, it was almost immediately written in C.





Why? Programming is a branch of applied mathematics. In essence this means we are almost always abstracting from the properties of our machines to find ways to get them to do what we want them to. C is precisely a great language for System programming, embedded programming and graphics and other drivers because if a device is controlled by switches (as most are) it is one of the most straightforward for creating a logical model of any device which will send it the commands that make it work while providing an interface which we can understand.





The above poster recommended Visual C++ and OpenGL. Since I'm on Linux I'm not going to recommend Visual C++ but will recommend OpenGL. On the other hand, I don't see what that has to do with the topic beyond being examples of them. Visual C++ is optimized for the Microsoft Windows system. If you are writing for the Microsoft Windows Operating System there is no reason not to take advantage of the Visual C++ libraries. However Borland's products, Bloodshed Software's DevC++ and Digital Mars's C/C++ compiler also have Windows libraries which are perfectly good (and more secure because they use fewer undocumented features). OpenGL is implemented across most x86-based OSes and provides great hardware access. Using their libraries is a real blessing. I've linked to a site which hosts openGL tutorials in sources. Both are examples of many tools which have been created using C and C++ for the reasons I stated in the beginning.





You might also check out a prototyping language called tk/tcl which came out of Unix but provides a quick method of creating GUI-based applications across several platforms. Once you understand the concepts you will be better able to research and use the libraries which are best for you or, alternatively to learn what you need to do to write them.
Reply:if you r asking abt graphics using c i think the most powerful tool for this is visual c++ using opengl , but for making codes that powerfull for different applications with relatively simple interfaces i think C++Builder is your best choice ...you will thank me for this program because it is very powerfull..i even made a code using it to to the screen dancing on and off .


you can find useful exaples and explanations at this website :


www.dr-dmitriy.tu1.ru

potential break up song

Please if someone can help me to build a thesaurus in c programming?

Off the top of my head, I would create a b-tree that points to a structure containing a word as an entry, and a pointer to a linked list with pointers to other words that are synonyms.


Is there any C programming involved in Cisco Networking?

No.


Wat is programming C?

can anybody tell me wat is programming c? is any scope in this? tell me in detail

Wat is programming C?
It's a procedural language developed for the Unix operating system.





It's been upgraded / replaced by C+, C++, Visual C+, and C#. There are tutorials on the web you can look at, but the pop ups were over the top.





So, I sent you to Wiki, and you can go from there.





See the link below.
Reply:It's one of many programming languages. You have to study it, no one can just tell you in detail how to do it on a forum like this. Here is a list of languages and some of their details/uses.





http://www.engin.umd.umich.edu/CIS/cours...


Can I have someone look at this C programming problem?

I'm supposed to write a program that accepts two interger vallues typed by the user. Then display the results of dividing the first interger by the second, to three decimal place accuracy. It is supposed to be able to check for division by 0 and must use a conditional operator.





My idea was to float variables a b c


have the user input a and b then make a conditional operator stating





c = (b==0) ? .454 : a/b;


if(c==.454)


printf("Dividing by 0 is undefined");


else


printf("The answer is %f\n" c)





It's ghetto and its obviously bad programming, I know.





I get a floating exception when I make a and b and type of integer which I don't understand.





I'm going to drop this class this week because I need to face that I have absolutely no aptitude for this programming language, but I would still like learn just in case I attempt it again next semester.





Can anyone guide me?

Can I have someone look at this C programming problem?
hi,


please try the following code:





c = (b==0) ? 0 : a/b;


if(b==0)


printf("Dividing by 0 is undefined");


else


printf("The answer is %f\n" c)





The problem is that you should not use floating point variables for comparison.
Reply:the conditional operator has the same effect as the logical IF.


i dont see use of ur first line, i miss the logical programming in it.. what if b is = to 0 and c not, what if the opposite??


i suggest that simply check for a,b, and c different than 0 and then do ur division operation..


about droping ur class, i dont think it is a rigt decision, programming courses need a lot of patience... but believe me, once u got the keys u ll master it


if u think u ll only need class attendance for ur class then u r wrong.. it needs more, and it needs lot of practises and exercises, u ll have to do programming as a hobby, and love it more than a hobby..


it is not easy, but believe me it is worthy





good luck :)
Reply:The code above looks fine. Can you post your entire code? It's not bad programming above.





Just to clarify as well: is it printf("The answer is %f\n" c) or printf("The answer is %f\n" , c) (with the comma) in your code?





EDIT: Yeah there is the issue of floating point comparisons as well. The above code works.
Reply:do something like this:





int main ...





get int a from user


get int b from user





if b == 0 then


print "error: cannot divide by zero"


else {


float afloat = (float)a;


float bfloat = (float)b;


print "answer is: %0.3f", afloat / bfloat


}





return 0;





--


Change the above to correct C syntax.





Since you cannot divide two integers to get a float then you must change the int to float.

ovary

Explain the diffrence between of malloc & calloc, in c programming?

Explain the diffrence between of malloc %26amp; calloc, in c programming

Explain the diffrence between of malloc %26amp; calloc, in c programming?
void *malloc(size_t size);





The function allocates an object of size_t size (size_t = int, char, float...etc), and returns the address of the object if successful; otherwise, it returns a null pointer. The values stored in the object are indeterminate. You can safely convert the return value to an object pointer of any type whose size is not greater than size.





void *calloc(size_t nelem, size_t size);





The function allocates an array object containing nelem (number of elements) each of size_t size, stores zeros in all bytes of the array, and returns the address of the first element of the array if successful; otherwise, it returns a null pointer. You can safely convert the return value to an object pointer of any type whose size in bytes is not greater than size.
Reply:Malloc is for 1 dimensional chunks of memory





Calloc is for 2 dimensional chunks of memory
Reply:calloc is for allocating an array of n elements, each of size (in


bytes) m. The memory returned will have been completely


initiailzed to zero (0).





malloc is more primitive and simply returns a big block of


uninitialized memory of the size (in bytes) that is requested.





These bits of code are equivilant:





1,


char *alfs = (char *) malloc(50);


if (alfs)


memset(alfs, 0, 50);





2.


char *alfs = (char *) calloc(50, 1);


I cant understand pointers and structures in C programming?

i know the basics but can anyone tell me tricks and basic things to remember for sure. i get confused when it comes to pointers and arrays and there connection and when to use *p and when to use %26amp;p and when not to. can anyone summarize the rules and common mistakes with pointers and structures in C programming. Also string literal basics as well. Thanks.





Whateveryou can explain will definitely help!

I cant understand pointers and structures in C programming?
Homestar is right as far as he goes. He uses a type called "string" which wasn't part of the ansi c language last Og checked - and quite frankly, strings, char arrays, are almost everybody's first introduction to the finer points of pointers vs the object to which the pointer refers. Og like to suggest picking up a copy of K%26amp;R (because it's thin and pretty easy to understand) and maybe suggest you throw references into the mix (references keep you from making 'stupid' mistakes with pointers - things like freeing memory that you shouldn't).





Everybody write this once:





char *myname = "Og";


char[] firstName = "Og";


char[2] alsoFirstName;


strncpy( alsoFirstName, myname, strlen(myname) );





printf( "myname: %s\n", myname ); // s.b. ok


printf( "firstName: %s\n", firstName ); // also ok


printf( "alsoFirstName: %s\n", alsoFirstName ); // oops!





Why does that third one fail? Because the array doesn't actually have space allocated for two characters plus one terminator (\0) symbol.





Note the different forms of initializing a string pointer, as well (all three variables can act like a char const*). In the first case the string (the two letters 'O', 'g' and the terminator) are kept in some data segment that never changes. In the second and third examples, the string is stored on the stack.





Anyway, this is pretty deep topic. Maybe e-mail work better. Barring any real concrete examples just remember: const and %26amp; (reference type) are your friends.
Reply:Structures are a collection variables under a name.Each variable within the structure can be accessed using the '.' mark.


An example would be this





struct profile{


string name;


int age;


}person1;





As you can see i have created a new structure called Profile and a new instance of this structure called person1.Now if i want to store anything about person1 i would do it like this.





person1.name = "Joe Schmoe"





As you can see i use the '.' mark to access the variables within the structure.Hope that helps you.





As for arrays,they are also a collection of variables,however they all have one datatype.To declare an array i do so.





int age[2]





The number within the square brackets indicates i want two integers named age.


To access each part of this array you also use the square brackets.However you must start counting from 0 when you want to access an array.Below is an example of me initializing both these integers.





age[0] = 65;


age[1] = 23;





I hope you understood me clearly ^_^.





Im not very good with pointers so bare with me.


A pointer points to a space in memory,a pointer will store this place in memory as an address.Declaring a pointer is as easy as declaring any other datatype,but you must place an asterisk (*) after the datatype.





e.g int* my_pointer;





Now to use this pointer we must assign it the address of another variable.For example say we had a variable called "age".To point to this variable in memory we must precede its name with the Ampersand sign (%26amp;).





e.g my_pointer = %26amp;age ;





Now if we were to output this pointer,it would give us the memory address of the variable age.





EDIT:Sorry i code in c++ i forgot to not use strings,however you should understand how structures work :)
Reply:OK... three questions in one.





Firstly pointers. Pointers aren't variables - but they do point to them. Pointers are defined using a * between the type and the variable, for example:


int *pointer


or


int* pointer





The latter makes more sense, as you're defining a pointer to an integer, and not an integer. However, it can cause confusion if you define normal integers on the same line, for example:


int *pointer,variable


or


int* pointer,variable


both define pointer as a pointer to an integer, and variable to an integer.





Pointers let you have multiple instances of the same variable. For example:


int i=3; /* initialise an integer */


int *p; /* create an integer pointer */


p=%26amp;i; /* and point it to the address of i */


*p=5; /* set value of integer pointed to by p, to 5


printf("%d %d",i,*p); /* print out value of both variables */





Not too useful, since I could have just used i and not the pointer? True. However, this comes into its own with allocated blocks of memory and (more simply) arrays.





See http://www.cprogramming.com/tutorial/c/l... for more details.





Next, structures. Basically, a group of variables tied together. For example, you could have an address-book with a structure 'addressBookEntry' for each entry, and within the structure you could have a name, address, phone-number, etc - but which could be referenced by a single variable name (or array) so that all the associated data is kept together within the same structure. Like a box.





I'll point you at the same site, next chapter for more info.


http://www.cprogramming.com/tutorial/c/l...





Finally, string literals. These are defined within source-code as the value of a quoted string. For example:


"This is a string literal"





Again, more info at the same site:


http://www.cprogramming.com/tutorial/c/l...


Is there any online tutorials or book out there for programming a psp with C/C++?

I want to program a PSP really badly but I don't know where to go. Please don't tell me psp-hacks.com because I have been there and I got banned from the chatroom because I asked too much questions (wtf!). Also don't say psp-programming.com because they barely have any tutorials on psp programming. Also are there any books out there that teach you psp programming?

Is there any online tutorials or book out there for programming a psp with C/C++?
Hacking the PSP (http://www.hackingpsp.com/), PS2Dev (http://www.ps2dev.org/) and QuickJump (http://www.qj.net/) all have information about developing PSP applications. In particular, look at the forums for each of those sites.





There is a version of CodeWarrior adapted for use with the PSP. You may want to look at that for your IDE, though there are other options, as well.





It doesn't look like there are any books about programming for the PSP, only hacking the system itself.





And it's not C/C++ but Adobe (http://www.adobe.com/devnet/devices/psp.... has information about developing Flash applications for PSP, as well.


C programming help with scanf?

by referring to the code below:





void digestline(void) {


scanf("%*[^\n]"); /* Skip to the End of the Line */


scanf("%*1[\n]"); /* Skip One Newline */


}





can anyone explain what the [\n] parts are? I couldn't find any documentation online referring to such a format.





(I found this code on http://vergil.chemistry.gatech.edu/resou... )

C programming help with scanf?
y not dear





% hope u know it so i m not explaining it





* to read all chars from the input (keyboard iostream / io buffer)








[] what is contained in it is an regular expression





^ tells not





\n a new line char





so the first scanf will skips all characters until the newline char is found...





where as the second scanf function allows u to only read new line char only and only once ie. while storing to any char array u also stores there a new line char but in case of first u didnt i.e. u discarded the storage if a new line char occurs....





but i let u know to which variable the values are going is missing.................





anyway rank my answer which encourage me to answer more


http://www.geocities.com/ankur899/
Reply:The asterisk means the read value will not be stored in any variable, and the [^\n] just means read an entire line. %*[^\n] will accept any character except \n.





This is cheating by using regular expressions. Its not really standard C.

memory cards

Wht is the programming in c language to list all the nodes of binary tree?

You would have to keep searching from the root node...every time you hit the bottom of a tree (or a situation where you've checked both sides of the tree)....start moving back up and check the other direction (IE if the bottom of the tree is left...go to the parent node and look right).





//-------------


You should have one variable whose structure looks like this


struct nodecheckedtype


{


int numericvalueofnode;


bool isleftchecked;


bool isrightchecked;


}


nodecheckedtype isnodechecked[100];


//check up to 100 nodes





and then simply loop to match the value/number stored in the node you are in to "numericvalueofnode" to find out which node you are in before you check if you've already covered the paths on the left and right of that node.





This structure is key to stopping you from covering the same path twice...and ends up storing the values of ALL nodes in your binary tree (so you can print them).


//----------





Keep track of all the nodes where you have checked left and/or right...and never go down a tree you have checked both the left and right side of before. Once you are stuck at the top level with both the left and right nodes relative to it checked (IE you have been to the left and right sides of both of those nodes) you are done. :-)


Thursday, July 30, 2009

How long will it take to master C++ programming language spending 5 hours a day on it? I know basic Pascal.?

Well, difficult to say how long it would take, until your currnet skill, logic and intelligence, available study material and learning environment is known. However I would give you some tips to speed up your learning process:





1. Unlike Pascal etc, C++ is an Obeject Oriented Language. So you first have to clear your understanding of object orientation. To help with this, follow learning about: Classes and Objects, Encapsulation, Polymorphism and Inheritance. Use these keywords to search internet and understand them logically.





2. After you get initial introduction, try taking daily life problem to program not just reading others codes and trying them on pc (it is useful in begining though)





3. For beginners, I found Robert Lafore's book "Object Oriented programming with C++" very useful that states even complex thing in very simple mannor.





4. C++ is very powerful for low level programming. If you have a good knowledge of operating system archtecture and your PC archtecture, you can be a good C++ programmer.





5. Begin with Turbo C++ for dos, as it is comparatively simpler 16 bit real time development enviournmet. Once you get skilled in basic ideas and low level ability of C++, you can then attempt to more sophistcated 32 bit protected/virtual versions of C++ (Visual C++ for example).





Finally, first try to get expertise on Object Orientation, rather than other things, then gradually proceed further.





Hope that will be of sufficient help and will promote your learning speed

How long will it take to master C++ programming language spending 5 hours a day on it? I know basic Pascal.?
It'll take five months 2 days, 3 hrs, 25 mins and 33 secs to master C++. You must've understood by now that I'm kidding, right.


Don't think of 'mastering' right from the beginning. First aim to learn the basics, roots and try to write some useful, simple programs to get started. The speed of your learning will solely depend on your dedication and interest in it.


People have been programming for years and say they haven't mastered the thing yet. I hope that'll take you in the right direction.
Reply:It depends on how good you want to learn it. I've learnt it in school for one year, having two classes of theory a week (one class lasts 45 minutes) + two classes of exercise. I think that now I know it quite good, because I went to some competitions. Pascal is an excellent base for C++, it will be very helpful for you, because you won't have to learn most of iterative methods again. Methods which might be a problem for you are classes, backtracking, dynamic programming and graphs. I wish you luck!
Reply:Well, for a while.





C++ is an OO (Object Oriented) Language. And that's more difficult to learn than the syntax itself. I suggest you study OO itself before diving into syntax. This will minimize confusion on your part.
Reply:As stated it is very different. And it also depends on how mastered you mean.





It will take a long time still
Reply:It will take 6 months, to speeden up things you can contact a C++ expert at http://k.aplis.net/
Reply:Learn how to write basic programs with C++, properly? Probably a couple of months. Intermediate programs? A few years. But master it? I don't think aside from a few people in the entire world, that you can call masters of C++.





Getting to a level of competence with C++ requires you to understand C++ itself first of all. But to write any decent programs with it, you also need general programming knowledge, and that will take time.
Reply:Judging by my exes attempts about 5 years


What is the best resource to learn C# programming? (Online or Book)?

I have a short background of programming in delphi and visual basic. (less than 1 year)

What is the best resource to learn C# programming? (Online or Book)?
http://www.learnvisualstudio.net/
Reply:I used this site and it taught me pretty well





http://www.cplusplus.com/doc/tutorial/





Plus you could always ask questions here if you had problems
Reply:Depends on what you want. Quick (relatively) overview, survey type of approach? Online may be better. In depth understanding, for professional or serious work? You might find that a book from O'reilly or Microsoft is good for precise definitions, a relatively rigorous approach, and written for an intelligent reader.


I used several on-line tutorials to learn xhtml-mp and wml for mobile phones and they were quite adequate--but I already knew (older) html in depth. I used the O'reilly book for JavaScript, and it was exactly what I needed--a rigorous and in depth approach.


You can also get other types of books--Wrox and the "for Dummies" books come to mind--which are written to be less demanding for the reader, imo and experience.


To the extent that you are seriously interested in the language and environment, I would suggest that you get one of the more rigorous books (O'Reilly or Microsoft usually, and undoubtedly others). You can check the reviews on Amazon for what will suit you best. Read half a dozen to ten reviews, and you'll have a good picture of the book.


With your background, even though short, you can probably take either/any approach--if you concentrate and focus on learning, you should be able to be producing code in a few days. Slowly at first, and learning as you go, but easily doable. Good luck.
Reply:Illustrated C# 2005





By Daniel Solis. ISBN: 1590597230





http://www.apress.com/category.html?nID=...


Where should I go Next with C++ Programming?

Im learning C++ and i have learnt the basics in Programming (Arrays, Data Structures, Etc.) and I have tried to learn Windows Programming but, It just makes no sense. What should I learn before learning Windows Programming to make it easier?





- Cheers, Daniel

Where should I go Next with C++ Programming?
Some good topics:





Exception Handling


Templates


The Standard Library


Multiple Inheritance





A great resource is Thinking in C++ by Bruce Eckel. You can download a free copy of the book from his website here: http://www.mindview.net/Books/TICPP/Thin...





As far as learning Windows programming, the best resource is Programming Applications for Windows by Jeffrey Richter. It is out of print though, so the best way to get it would be via Amazon, EBay, etc. MSDN is also a great source (More as a reference though).





You should also consider C++/CLI, which is quickly becoming one of my favorite languages. All the power of C++ as well as the power of the .Net framework.
Reply:Before you go any further, I would suggest learning more about C++ programming. You can't jump straight into something like Win32 if you don't have much knowledge in C++.





Make sure you understand basic file I/O, arrays, data structures, the Standard Template Library, and other basic operations. And make sure you know HOW they work, and not just what they do.





If you don't, then Windows programming WON'T make sense to you. Windows programming involves callbacks, handles, drawing, controls, calls more advanced than console applications, etc.





http://www.cprogramming.com would be a good place to start. =) And http://www.gamedev.net/ community is AWESOME. If it wasn't for them, I wouldn't be where I am today. They are great.





So learn more about the language before you move on. Once you understand it really well, then get into something like Win32 programming. =)
Reply:learn JAVA, C#, .NET
Reply:In the Etc. is also included Classes? virtual members, protection hierarchy end so on?


If not, learn classes.


Once you learnt C++ syntax, you should learn how windows works (Messages, events and so on)


You should read something on General Windows Programming and Windows Classes better MFC (classes to manipulate create Windows)

lotus flower

I have learnt c & c++ programming and i am planning a career in sap is it good for me. and specilaize in what?

abap , hr , marketing ...etc

I have learnt c %26amp; c++ programming and i am planning a career in sap is it good for me. and specilaize in what?
Try MM , Fico.


In c programming using fibonacci sequence, if n=2 and sequence=5, can you display "2 2 4 6 10" using C code?

C programming only pls.

In c programming using fibonacci sequence, if n=2 and sequence=5, can you display "2 2 4 6 10" using C code?
google it, something like:





fib(n){if(n==1||n==o)return 1;else fib(n-1)+fib(n-2);}





Hope that helps


How can i make system programming using c++ or c?

i want to access the system operating system of windows xp using c or c++ eg. including the .exe commands in the program


such as regedit.ext , cmd.exe or other like run.ex dir.exe .......etc


how can i do it can you please tell a link to a website that can i find a hint or give me an example using this.

How can i make system programming using c++ or c?
You may contact a c++ helper live at website like http://ccietutorial.com/


I like programming C++ for circuits,what is your suggestion for refrences?

www.codeproject.com

silk flowers

Where can i get help with programming - C++?

i would like to know the best places on the internet to get help with my C++ assignments as a beginner in C++


would anyone please tell me where to go?





thanks a lot in advance.

Where can i get help with programming - C++?
http://www.cplusplus.com/


How can i be a master of C programming and which book will help me..?

I am a first year computer science engineering student

How can i be a master of C programming and which book will help me..?
first of all i would not become a master of C programming language. I graduated with my bachelors in computer science and I have been working in the real world now for 3 years as a Software Developer.





C is a dying language and mastering in it or using it as a main focus in college will not get you far in the job market. I took C and Java in college and working out here in the job market, every person that I talk to that I graduated with regrets learning C. It is a good language to learn and you can still learn it but I would consider the options below:





If I were you I would consider mastering in either Java (J2EE), C++, or any .net derivation whether it is .asp or visual basic.





Most of the companies that are looking for programmers, assuming that is what you want to do are looking for skills in the languages above. Good luck


Hi all.. about the command window programming C?

i do some simple C programming. i wonder after i run the coding, and no error, but the command window (black) just appear a second and then disappear. this is my simple codding





#include %26lt;stdio.h%26gt;





int main()


{





printf("hai");





return (0);





}

Hi all.. about the command window programming C?
The program is fine. If you see it prints "hai" to the screen and will come back to the code as you have not instructed to wait for your key-press.





Please add





#include%26lt;conio.h%26gt;





just below stdio.h declaration





%26amp;





add





getch();





just above return(0);





you can use void main() always if you do not return any value. Its a good habit and will reduce the code length. You can avoid this return line.





Hope this helps!!! All the best
Reply:Try:





#include %26lt;stdio.h%26gt;





int main()


{





printf("hai");





system("PAUSE"); /* Enter this line */





return (0);





}
Reply:this is because you created an error.


like if you typ 1/0, this same will occur





#include%26lt;iostream.h%26gt;


#include %26lt;stdio.h%26gt;





int main()


{


cout%26lt;%26lt;"hai";


return (0);


}





#include%26lt;iostream.h%26gt;


#include %26lt;stdio.h%26gt;





void main()


{


cout%26lt;%26lt;"hai";


}





It works either way


What is the code for the program C Language?

I've been looking for a code for the program to run, the program is called C Language, and it is our project to discover its code,

What is the code for the program C Language?
It's in this book:


http://cm.bell-labs.com/cm/cs/cbook/
Reply:C as a programming language has been around for quite some time. The lastest version of this language is called "C++". It is a professional grade/business grade development language. Many many business software programs are/were written in this language. You can find tons of reference material on this programming language at Borders or Barns %26amp; Noble, and also your local public library.
Reply:There are plenty of online courses, indeed, a quick online search finds reasonable courses in C programming.





These courses contain examples, so try them out!

purple flowers

What is the explanation as to why the programming language C# is called C-Sharp?

why did Microsoft introduce microsoft? Why was the language called C-Sharp?

What is the explanation as to why the programming language C# is called C-Sharp?
Because the Sharp symbol (a musical symbol) is not present on a standard keyboard so they substituted it with the # symbol.





Thank you for asking that excellent question. I learned something new tonight. I always thought it was called "C Number" but it never sounded right to me. Then again neither does C-Sharp, but oh well it's just a name.
Reply:I don't know why they named the language C - sharp, but in music, C# would be C sharp, just like Ab would be A - flat
Reply:the # sign, in musical notation, means sharp. C# means C-sharp, notewise.
Reply:# is used to raise a note one-half step sharper in music.
Reply:There is an old saying passed down from music teachers to students: "see sharp, or else you will be flat".





C# is supposed to be an improved version of C.


Ironically, there was a language called B, which is what preceded C.


B was a stripped down version of BCPL.





On the other hand, maybe they got the name by coping it from Al Stevens. He wrote some articles a couple years before C# was announced and he used the name a couple times to refer to his own programming language work.





A rose by any other name is still as sweet, eh?
Reply:C# = C-sharp? Well in music C# means C sharp, so maybe that's what they were getting at. But then again, I don't really understand your question.
Reply:The programming language "C" is not owned by microsoft. They wanted a language to be similar and better. The "#" sign in music is read "sharp" and means move up. So Microsoft developed C# pronounced See Sharp to be better than C.
Reply:It's from musical notation. The pound (#) sign signifies a sharp note.
Reply:Its a half step forward? I can't wait to see the full step forward with c## ... ...
Reply:the # is the music world is the symbol for a sharp note. Hence C-sharp.
Reply:In oz ... well I call it anyways... C-Hash
Reply:MS designed C-Sharp to have the same flavour as Java, I think.





# is the musical symbol for a sharp note. It's a pun, I guess.


What is the best software for C++ programming on mac?

%26lt;geek%26gt;





Check out the Apple developer tools, "Xcode" because they are free and should be in the install folder in your Applications folder.





Also, check out the Macintosh Programmer's Workshop at:


► http://developer.apple.com/tools/mpw-too... there's some C++ compilers in the "Compilers section"





%26lt;/geek%26gt;


How to make a multiplication table using looping statement of c programming?

void main()


{


int number,i,result;





printf("Enter the number whose table is required\n");


scanf("%d",%26amp;number);





for(i=1;i%26lt;=10;i++)


{


result=number*i;


printf("\n%2dX%2d=%2d",number,i,result);


}





getch();


}

How to make a multiplication table using looping statement of c programming?
If you just want a list of numbers you just need a loop similar this





int factor;


int max_itterations;


int itterations;


factor=5;


max_itterations=12;


for (itterations = 1; itterations %26lt;= max_itterations; itterations++)


{


printf("%d ",(itterations * factor));


}





You can produce a table by introducing another loop that will display the numbers however you want them formatted.
Reply:here is the code for u





#include %26lt;stdio.h%26gt;





int main()


{


int table_size = 12;


int row = 0;


int col = 0;





for(col=0 ; col%26lt;=table_size ; col++){


printf(" %4d", col);


}


printf("\n");


for(col=0 ; col%26lt;=table_size ; col++){


printf("_____");


}





for(row = 0 ; row%26lt;=table_size ; row++){


printf("\n");


for(col = 0 ; col%26lt;=table_size ; col++) {


if(row == 0) {


if(col == 0){


printf(" ");


}else{


printf("|%4d", col);


}


}else{


if(col == 0){


printf("%4d", row);


}else{


printf("|%4d", row*col);


}


}


}


}


printf("\n");


}








try this also man





#include%26lt;stdio.h%26gt;


int main(void)


{


int i=0;


int j=0;


int result;


int d=0;


int w=1;


printf("which number you choose");


scanf("%d",%26amp;d);





result=d*j;


for(j=1;j%26lt;=10;j++)


printf("%d*%d=%d\n", d,j,d*j);


printf("\n");


return 0;


}








but this is final next time try it by yours ok
Reply:#include%26lt;stdio.h%26gt;


main()


{


int x,y;


for (x=1;x%26lt;=10;x++)


{


for (y=1;y%26lt;=10;y++)


{


printf("%dX%d=%d\n",x,y,x*y);


}


}


}