c programming
zeno99 (0)

Im trying to define the variable in C programming.
Does anyone how to do it and the difference of data type while defining it?

You are viewing a single comment. View All
ryanhcode (91)

Almost just like any other programming language.
For example.
int foo = 22;
string Da = "Hello World!";
Remember google is a good resource for this as well!

JustARatherRidi (191)

@ryanhallihan I've got news for you buddy, there is no 'string' datatype in C, what you should do is use a character array, like so

char[] name = "ryan";
JustARatherRidi (191)

@ryanhallihan No problem, but try and be a bit more careful when you're posting an answer to someone relatively newer than you are. They might think they're doing something wrong, which might confuse them further.