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

What is %d called in c?

0 Answers  


Why doesn't the code "int a = 1000, b = 1000; long int c = a * b;" work?

7 Answers  


Explain the difference between malloc() and calloc() function?

0 Answers  


Compare interpreters and compilers.

0 Answers  


Which is better malloc or calloc?

0 Answers  






int i=10; printf("%d %d %d", i, i=20, i);

0 Answers  


write a C code to reverse a string using a recursive function, without swapping or using an extra memory.

9 Answers   Motorola, TCS, Wipro,


52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?

25 Answers   Datamatics, Solartis, TCS, ThinkBox, Trine,


Is c functional or procedural?

1 Answers  


Write a program that will read the input of any number of digits n in a row of shafh showing the breakdown of the printing and printing figures by the recursive function.

0 Answers  


Write a program to swap two numbers without using a temporary variable?

0 Answers   Infosys,


Function to find the given number is a power of 2 or not?

20 Answers   Motorola, nvidia,


Categories