Sail E0 Webinar
Question


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;
Options:
A .  Yes
B .  No
Answer: Option A

In these declarations, s1, s2 and s3 are all treated as char*, but s4 is treated as a char, 

Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers