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

write a program to check whether a given integer is a strong number or not? [Hint: 145=1!+4!+5! =1+24+120 =145]

7 Answers  


How to access or modify the const variable in c ?

16 Answers   HCL, HP,


How do we print only part of a string in c?

0 Answers  


what is the differnce between AF_INET and PF_INET?

5 Answers   Systems Plus, Wipro,


Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d

1 Answers   TCS,






Explain how can you be sure that a program follows the ansi c standard?

0 Answers  


Which built-in library function can be used to match a patter from the string?

0 Answers  


Differentiate fundamental data types and derived data types in C.

0 Answers   HCL,


Disadvantages of C language.

0 Answers   Impetus,


When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?

2 Answers   Aloha Technology,


What are the header files used in c language?

0 Answers  


swapping of two numbers without using third variable using AND and OR operators

2 Answers  


Categories