main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is:

a) Variable 'str' is not initialised

b) Format control for a string is not %s

c) Parameter to scanf is passed by value. It should be an address

d) none


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

0 Answers  


What is the use of sizeof () in c?

0 Answers  


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

0 Answers  


Why c is called free form language?

0 Answers  


Is that possible to store 32768 in an int data type variable?

0 Answers  






Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….

1 Answers  


Explain why can’t constant values be used to define an array’s initial size?

0 Answers  


What is a memory leak? How to avoid it?

1 Answers  


where do we use volatile keyword?

1 Answers  


Explain what is operator promotion?

0 Answers  


How do you print only part of a string?

0 Answers  


Write a program to print all permutations of a given string.

0 Answers   JPMorgan Chase,


Categories