1
c programming
zeno99 (0)

hello,
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
2
ryanhcode (85)

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!

1
JustARatherRidi (185)

@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";
2
JustARatherRidi (185)

@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.