|
Question |
Rating |
View Answer |
|
main() { extern int i; i=20; printf("%d",i); }
|
|
View Answer |
|
void main() { float a= 0.7; if (a < 0.7) printf("c"); else printf("c++"); } Output of the above program is c. Why? Whereas the same program with 0.8 instead of 0.7 gives c++ as the output? Why explain? |
|
View Answer |
|
Write a program to remove comment lines and blank lines from an error free c program. |
|
View Answer |
|
To which numbering system can the binary number 1101100100111100 be easily converted to? |
|
View Answer |
|
When should a type cast be used? |
|
View Answer |
|
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
|
|
View Answer |
|
How to find size of an datatype without using sizeof operator? |
|
View Answer |
|
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); } |
|
View Answer |
|
When should the register modifier be used? Does it really help? |
|
View Answer |
|
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
|
|
View Answer |
|
What would be the output of the following program?
main() { int y=128; const int x=y; printf("%d",x); }
|
|
View Answer |
|
Which mistakes are called as token error? |
|
View Answer |
|
void main() { int const * p=5; printf("%d",++(*p)); }
|
|
View Answer |
|
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
|
|
View Answer |
|
If the following program (myprog) is run from the command line as myprog monday tuesday wednesday thursday What would be the output?
main(int argc, char *argv[]) { while(--argc >0) printf("%s",*++argv); }
|
|
View Answer |
|
What are the standard predefined macros ? |
|
View Answer |
|
According to ANSI specifications which is the correct way of declaring main() when it receives command line arguments?
|
|
View Answer |
|
union u1 { int i; char c; }u2; u2.i=32767; u2.c='a'; now the i value gets replaced. If we want to know the data that is saved in the union..internally, without knowing what values that we are using in the prog.
that is if just want to know whether a union currently holds an int or a char? If it is a combination of both int and char..we must know even that. and the memory locations at which this data is stored?
|
|
View Answer |
|
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); }
|
|
View Answer |
|
Can a file other than a .h file be included with #include ? |
|
View Answer |