I am 20 year old meal from balgum I am doing my b.e(computer science). I want to know that tha how to takal the quastion on c .plz healp me to find the solution in c
how to go for a problame in c
what is a main thing for that we have to take care
Are you talking about C++ or C sharp? C++ is a low level language and C sharp is a medium and a high level language. In C++ you tell the computer what to do and how to do it. In C sharp you tell the computer what to do, it already knows how to do it. In C++ you deal with funtions. In C sharp you deal with objects.
Guest (one of many) writes: "C++ can be object oriented depends on which compiler you use."
-----
Not quite. A particular implementation written in C++ can be object-oriented - or not - depending on the programmer's design choices. C++' "object-orientedness" has nothing at all to do with which compiler is used. Either the compiler conforms to the C++ language definition, or it's not a C++ compiler.
-----
Guest further writes: "You need to build the objects or use someone else library."
Would someone please point out to me where, exactly, does the original poster refer to C++ or to C# even once in his/her post or in the thread's Title? This O.P. is quite obviously at Step 0. Does our introducing C's derivatives/successors at this point help at all? Then why are we doing it?
We're doing it because we want them to understand the differences. Even though they're green, it doesn't hurt to give a little bit of understanding...chances are they will eventually do C++ or C sharp in the future. It's just like explaining the differences between Linux and Microsoft. Even though Microsoft used most by people and cost $199.00 to $299.00 to up grade...Linux offers a whole lot more, plus it's free.
I think the O.P. is at Square One. If so, I'd say understanding the differences between C and C++ (and MicroSoft's Java rip-off, C#) is something of a moot point, primarily because if one doesn't know what something is, one cannot tell how that something differs from something else it is related to but is not.
As an example, let's say I'm visiting Belgium for the first time and I'm staying with a good friend in Brugge. It would only serve to cause me confusion if, when I ask my friend about Brugge, she describes Brugge in terms of Hasselt, a city I also know nothing about. Do you see the problem?
But once I'm comfortable and can find my way around Brugge, know a few traffic laws and customs, and so forth, I might lease an auto and feel comfortable driving to Hasselt. C++ programs contain a great deal of what might be described as plain vanilla 'C,' just as Calculus is mostly algebra. If one doesn't know algebra, it won't help much if one is given a Calculus book to study.
This, I believe, is the position in which our Original Poster finds him/herself. I say let's answer the O.P.'s questions, not our own. Deal?
If your new to programming in general, a good rule would be to keep everything tabbed, in C your going to be using a lot of the same functions all nested inside each other, just the same as PIC assembler code ect.
{
so if you
.......can keep everything tabbed
...............your be able to read it all a lot
.....................easier
}
/*also use a lot of comments lines, one for orginasition, or even just to section off code so you can troubleshoot code a lot easier*/
and it worked for me a lot, but play around with the functions, create seperate programs for each function so you can easily refer back to old programs and check code, ect.
Thanks for the good advice, and be sure to use spaces and not tabs in your source code (set your editor to expand tabs as spaces), as different editors - you may not be the only one editing your code someday - interpret tabs differently.
And speaking of editors, I highly recommend emacs.
I do believe your reply was meant not for me, but for the Originator of this thread, at which point I'll advise Originator: "please take note."
I agree. Here's one for our poster: write a small C program to calculate and print your average grade per course for the quarter/semester, based on points assigned for homework, tests, and finals, and the grades of each.
Bonus point: Write your program so that it saves this information to a file. That way, when you wish to re-calculate your average based on a latest score, you won't have to re-enter all your grades and points each time.