what is the output of
printf("%d",(scanf("%d",10));

Answer Posted / umesh

#include<stdio.h>
int main ()
{
int c;
printf("%d",(scanf("%d",&c)));
return 0;
}

in this case return 1 instead of entering any value as input.


printf("%d",(scanf("%d",10)));
in this case simply generates a run time error. bcoz Since scanf always expects a variable( address) to store the value.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I open a file so that other programs can update it at the same time?

648


Can a variable be both static and volatile in c?

594


how can I convert a string to a number?

583


Can the curly brackets { } be used to enclose a single line of code?

703


What is the benefit of using const for declaring constants?

574






What are the valid places to have keyword “break”?

642


what is the different bitween abap and abap-hr?

1726


What is #include stdlib h?

602


What is the right type to use for boolean values in c?

570


What is a pointer and how it is initialized?

589


Explain what is gets() function?

616


Write a program on swapping (100, 50)

622


Is a house a shell structure?

683


What are inbuilt functions in c?

551


What are identifiers and keywords in c?

555