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 i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
Write a program to receive an integer and find its octal equivalent?
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
String copy logic in one line.
how to check whether a linked list is circular.
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); }
Which version do you prefer of the following two, 1) printf(“%s”,str); // or the more curt one 2) printf(str);
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
how to swap 3 nos without using temporary variable
main() { clrscr(); } clrscr();