Author Topic: About C language.  (Read 2422 times)

Don't you need a return 0; in the end of that, or is that only in C++?

That depends on the libraries you'll be working on. Just perform a seach on C libraries. stdio.h is the most common for simple stuff, but there's also strings.h and math.h

didn't know they taught programming to convicted rapists

That depends on the libraries you'll be working on. Just perform a seach on C libraries. stdio.h is the most common for simple stuff, but there's also strings.h and math.h
Yes, we used stdio.h
Can you give me a layout of its commands?

I'm learning C.....

J is better though :P

Don't you need a return 0; in the end of that, or is that only in C++?
You need a return 0 for int main().

Which is something you should use. From what I've been taugh it's good form to have main return a value. So use int main() instead of void main().

You need a return 0 for int main().

Which is something you should use. From what I've been taugh it's good form to have main return a value. So use int main() instead of void main().
int is short for interval correct?



An integer is a number.

The forget does that mean?

Integer? Like... a number.

Just post homework here and you will have instant answers.

I am taking a C class, but regretting because I know about as much C as the class covers.

I prefer c++.



Code: [Select]
#include <iostream>
using namespace std;

void main()
{
       cout << "You just lost the game" << endl;
}

is greater than,

Code: [Select]
#include <stdio.h>

void main()
{
       printf("You just lost the game");
}


Even though the reason I like C++ better is that it uses object orientation, not cout I just felt like using [ code ] for the first time.

-snip-
I study C language in relation to my electronics classes.
Because of the low amount of data C requires its commonly used for microcontrolers and microcomputers.
c++ is way too much for a small chip thus, C is highly preferred over it.



Yeah, I use C to program my Arduino board.