why we wont use '&' sing in aceesing the string using scanf
Answer / Archana Kumari
Using '&' (apostrophe and ampersand) within a string when reading input using scanf can lead to unexpected results because these symbols have special meanings in C programming. To read a string with spaces or special characters, use the format specifier %s instead of %c. For example:
char str[100];
scanf("%s", str); // reads an entire line into str
| Is This Answer Correct ? | 0 Yes | 0 No |
Is calloc better than malloc?
Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NODE*next;int x;};type def struct node NODE; B)typedef struct NODE {struct NODE *next;int x;}; C)typedef struct NODE {NODE *next;int x;}; D)typedef struct {NODE *next;int x;}NODE;
WHAT IS MEANT BY LIFE?
What happens if a header file is included twice?
Where static variables are stored in c?
Which is better pointer or array?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
How can I open a file so that other programs can update it at the same time?
Why can’t we compare structures?
How can you print HELLO WORLD without using "semicolon"?
how to capitalise first letter of each word in a given string?