![]() Related Questions A) Runtime error. Access violationB) Compile error. Illegal syntaxC) None of the aboveD) Runtime errorExplanation: printf( ) prints address/garbage of i, scanf() dont have & sign, so scans address for Latest Answer : The printf will give some junk value (address) and scanf will wait for the input from user. once u enter a value u'll get Bus error(coredump). ... What is the output of the following program?#define SQR(x) (x*x)main(){ int a,b=3; a= SQR(b+2); printf("%d",a);} A) 25B) 11C) ErrorD) Garbage Value What would be the output of the following program? main() { int y=128; const int x=y; printf("%d",x); } A) 128B) Garbage valueC) ErrorD) 0 What would be the output of the following program? main() { const int x=5; int *ptrx; ptrx=&x; *ptrx=10; printf("%d",x); } A) 5B) 10C) ErrorD) Garbage Value Printf ("%d" ,printf {"tim") ); 1. results in a syntax error 2. outputs tim 3 3. outputs garbage 4. prints tim and terminates abruptly In C if a variable is not assigned a value then why does it take garbage value? Latest Answer : This happens only in case of local varibales. As memory for local variables are allocated on stack and while allocating the memory the runtime system does not clear the memory before allocating it to the variable unlike in case of allocating memory in ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||