What is the output of printf("%d")?
Answers were Sorted based on User's Feedback
Answer / arnab kuamr mahapatra
it will print a garbage value
that means default value an integer
Is This Answer Correct ? | 1 Yes | 0 No |
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 |
Answer / saranya
IT will print a warning only. So the output will be some
garbage value.
Is This Answer Correct ? | 1 Yes | 1 No |
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 |
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 |
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 |
Answer / sonu
The Output is 0.rite now run and check answer. thats right
answer.
Is This Answer Correct ? | 0 Yes | 0 No |
What are the characteristics of friend functions?
What are advantages of C++ when comparing with C?
18 Answers HP, iGate, TCS,
What is expression parser in c++
If all is successful, what should main return a) 0 b) 1 c) void
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.
How does atoi function work?
What are the vectors in c++?
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?"; } ///
What are the benefits of pointers?
write a programming using for loop in c++ to generate diamond trangel?
How can you quickly find the number of elements stored in a dynamic array?
What is an adjust field format flag?