main()
{
char name[10],s[12];
scanf(" \"%[^\"]\"",s);
}
How scanf will execute?
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
First it checks for the leading white space and discards
it.Then it matches with a quotation mark and then it reads
all character upto another quotation mark.
| Is This Answer Correct ? | 6 Yes | 2 No |
void ( * abc( int, void ( *def) () ) ) ();
main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
What is data _null_? ,Explain with code when u need to use it in data step programming ?
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
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"); }
Is this code legal? int *ptr; ptr = (int *) 0x400;
Write a C function to search a number in the given list of numbers. donot use printf and scanf
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.