main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4
Answers were Sorted based on User's Feedback
Answer / ankit
ans is option d if ypu don't believe run it in compiler you vl get the answer
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / abhinav
answer is 1,2
because of character takes 1 byte
and ascii value of 100 is 2.
| Is This Answer Correct ? | 0 Yes | 2 No |
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
main() { extern int i; i=20; printf("%d",sizeof(i)); }
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?