main()
{
char p[ ]="%d\n";
p[1] = 'c';
printf(p,65);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
A
Explanation:
Due to the assignment p[1] = ‘c’ the string becomes, “%c\n”.
Since this string becomes the format string for printf and
ASCII value of 65 is ‘A’, the same gets printed.
Is This Answer Correct ? | 30 Yes | 3 No |
Answer / hunny kukreja
Answer:
65
Explanation:
As p is having "%d\n",so it has become format string
for printf,so same will get printed.i.e. number 65
Is This Answer Correct ? | 4 Yes | 11 No |
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(“%d”,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(“%d”,*cptr); }
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
Write a program that reads a dynamic array of 40 integers and displays only even integers
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
write the function. if all the character in string B appear in string A, return true, otherwise return false.
What is your nationality?
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() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
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
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; } }
What is the main difference between STRUCTURE and UNION?
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }