Link to home
Start Free TrialLog in
Avatar of searchsanjaysharma
searchsanjaysharma

asked on

How to code this program.

Write a C program which when compiled and run, prints out a message indicating  whether the compiler that it is compiled with allows /* */ comments to nest.
Avatar of ozo
ozo
Flag of United States of America image

printf( /* /*  */ "comments do not nest */ " /* comments nest */ /* " /* */ );
Avatar of searchsanjaysharma
searchsanjaysharma

ASKER

Pleas read the question, i think the program has to tell whether nesting of comments is allowed by the compiler or not.
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@ozo - I am *impressed*!!

@searchsanjaysharma have you tried compiling this as the only code line in a program?  Just include stdio.h and add the "int main" bits round this code, compile and run.