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
What is %d called in c?
Why doesn't the code "int a = 1000, b = 1000; long int c = a * b;" work?
Explain the difference between malloc() and calloc() function?
Compare interpreters and compilers.
Which is better malloc or calloc?
int i=10; printf("%d %d %d", i, i=20, i);
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?
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.
Write a program to swap two numbers without using a temporary variable?
Function to find the given number is a power of 2 or not?