What is the difference between GETS();AND SCANF();
Answer Posted / vignesh1988i
the main difference between gets() and scanf() function is that while getting any input as a stream of characters or as a string using scanf() , the end termination character is a blank space or an enter key for scanf() , so upto blank space it will be saving it in the memory...... SHORTLY it ignores the characters comin after and with blank spaces........
in gets() , it allows with the blank spaces and the termination condition is a enter key (\n) ,
but a inside gets() function , surely they would have used scanf() function , but the difference is that the input inside gets() would go character by character , so only gets() can allow with the blank spaces...........
thank u
| Is This Answer Correct ? | 103 Yes | 47 No |
Post New Answer View All Answers
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Explain how do you declare an array that will hold more than 64kb of data?
What is the difference between a function and a method in c?
Write a program to generate random numbers in c?
What is nested structure in c?
Is return a keyword in c?
What is the purpose of void pointer?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is the difference between arrays and pointers?
Is stack a keyword in c?
What is union in c?
What is a stream water?
What is gets() function?
How many header files are in c?
a c code by using memory allocation for add ,multiply of sprase matrixes