Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 invoke another program or command and trap its output?

1054


What do you mean by scope of a variable in c?

977


What is a const pointer in c?

1083


How does pointer work in c?

1081


What are variables and it what way is it different from constants?

1196


What is string length in c?

1031


What are the usage of pointer in c?

1136


Explain what is operator promotion?

1034


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7997


Explain what are preprocessor directives?

1024


Explain how do you determine whether to use a stream function or a low-level function?

1035


What does nil mean in c?

1191


How to throw some light on the b tree?

1030


What are the types of type specifiers?

987


Dont ansi function prototypes render lint obsolete?

1069