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 |
main() { printf("%x",-1<<4); }
write a program to Insert in a sorted list
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
Write a c program to search an element in an array using recursion
How to palindrom string in c language?
main() { char not; not=!2; printf("%d",not); }
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }
could you please send the program code for multiplying sparse matrix in c????
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }