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 main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
how to delete an element in an array
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
can u give me the c codings for converting a string into the hexa decimal form......
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
WAP to display 1,2,3,4,5........N
write a program in c to merge two array
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above
main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above