#ifdef something
int some=0;
#endif
main()
{
int thing = 0;
printf("%d %d\n", some ,thing);
}
Answer / susie
Answer :
Compiler error : undefined symbol some
Explanation:
This is a very simple example for conditional compilation.
The name something is not already known to the compiler
making the declaration
int some = 0;
effectively removed from the source code.
Is This Answer Correct ? | 2 Yes | 2 No |
main() { printf("%x",-1<<4); }
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
Is this code legal? int *ptr; ptr = (int *) 0x400;
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
void main() { int i=5; printf("%d",i++ + ++i); }
can u give me the c codings for converting a string into the hexa decimal form......
write a c program to Create a registration form application by taking the details like username, address, phone number, email along with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 5 users and display the details. In place of password display “****”. (Use Structures).
0 Answers CDAC, College School Exams Tests,
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
Give a one-line C expression to test whether a number is a power of 2.
struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); }