Typedef

Q1: Is there any difference in the #define and typedef in the following code?
typedef char * string_t;
#define string_d char *;
string_t s1, s2;
string_d s3, s4;

A Yes

B No

ANS:A - Yes

In these declarations, s1, s2 and s3 are all treated as char*, but s4 is treated as a char, which is probably not the intention.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.