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

why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1768


Which type of language is c?

1079


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1441


Why is extern used in c?

1093


What is an example of structure?

1043


In which language linux is written?

1230


Explain how can a program be made to print the line number where an error occurs?

1223


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4695


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

1161


Why cant I open a file by its explicit path?

1038


I have seen function declarations that look like this

1046


What are identifiers c?

1092


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1062


Explain the use of 'auto' keyword

1125


What do you mean by a local block?

1087