What is the output of printf("%d")?

Answers were Sorted based on User's Feedback



What is the output of printf("%d")?..

Answer / arnab kuamr mahapatra

it will print a garbage value
that means default value an integer

Is This Answer Correct ?    1 Yes 0 No

What is the output of printf("%d")?..

Answer / soundar

it will display only garbage value

Is This Answer Correct ?    10 Yes 10 No

What is the output of printf("%d")?..

Answer / ashif ali

it will display only garbage value because
int a=12;
printf("%d");
output=12

Is This Answer Correct ?    8 Yes 8 No

What is the output of printf("%d")?..

Answer / keshav.gadde

The output is 0

Is This Answer Correct ?    9 Yes 9 No

What is the output of printf("%d")?..

Answer / saranya

IT will print a warning only. So the output will be some
garbage value.

Is This Answer Correct ?    1 Yes 1 No

What is the output of printf("%d")?..

Answer / beloshe vinod

Output will depends on number of values(local variables)
pushed onto stack .Out of that top of stack will gets printed
e.g.
static int a=89;
int b=67;
printf("%d");

will result in :> 67

Is This Answer Correct ?    2 Yes 2 No

What is the output of printf("%d")?..

Answer / vijay kumar cet bikaner 1st y

the output of printf("%d") is 0 beacause machine dureng the
execution of program has no address in the memory location
then it goes to the starting point then it print out the
value 0 .....

Is This Answer Correct ?    1 Yes 1 No

What is the output of printf("%d")?..

Answer / vinod

It prints the value in the stack.That means the if there is
previous initialisation of values.If there are no
definitions of integer varaibles,it would display the
garbage value.

Is This Answer Correct ?    1 Yes 1 No

What is the output of printf("%d")?..

Answer / narendra singh

ans.is
get ans zero

Is This Answer Correct ?    0 Yes 0 No

What is the output of printf("%d")?..

Answer / sonu

The Output is 0.rite now run and check answer. thats right
answer.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the characteristics of friend functions?

0 Answers  


What are advantages of C++ when comparing with C?

18 Answers   HP, iGate, TCS,


What is expression parser in c++

0 Answers   Mphasis,


If all is successful, what should main return a) 0 b) 1 c) void

0 Answers  


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

0 Answers  






How does atoi function work?

0 Answers  


What are the vectors in c++?

0 Answers  


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is <location>somewhere</location> #include <iostream> #include <fstream> #include <string> using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<<location << endl; cout << "Temperature: " << temperature << endl; system("pause"); } string find_field(string myPage,string find_string){ int temp=myPage.find(find_string); if(temp!=string::npos) { cout << "Match found at " << temp << endl; } return "found?"; } ///

0 Answers  


What are the benefits of pointers?

0 Answers  


write a programming using for loop in c++ to generate diamond trangel?

1 Answers   NIIT,


How can you quickly find the number of elements stored in a dynamic array?

0 Answers  


What is an adjust field format flag?

0 Answers  


Categories