What is the output of printf("%d")?
Answers were Sorted based on User's Feedback
Answer / vijay
it will print the recently assigned integer value.....
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / hardik jasani
void main()
{
printf("%d");
}
getch();
Output:0
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / sathya
it is the integer in decimal form..
#include<stdio.h>
main()
{
int sum;
sum=6+3;
printf("%d\n",sum);
}
| Is This Answer Correct ? | 2 Yes | 4 No |
Answer / creed
When insufficent argumrnts r give 2 c compiler it give
arbitrary answers
in turbo c it gives o/p =0
in other compiler it trys 2 read values from last stack top
i.e garbage
some compiler can may even crash
| Is This Answer Correct ? | 3 Yes | 7 No |
Answer / uma sankar pradhan
int a=30;
printf("%d");
the output is 30
| Is This Answer Correct ? | 33 Yes | 38 No |
Answer / mousam sahu
it will give the statement missing error
bcoz printf must have the statment ilke ;
| Is This Answer Correct ? | 2 Yes | 16 No |
Answer / mousam sahu
it will give an expression syntax error as printf must have
an expression like ;
| Is This Answer Correct ? | 5 Yes | 22 No |
I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.
When does a 'this' pointer get created?
Define vptr.
How many types of classes are there in c++?
List the features of oops in c++?
Which is best c++ or java?
What are associate containers?
CAN U SAY WHICH PROGRAMING LANGUAGE IS USED BY DOCTORS....?
Explain the pure virtual functions?
Write a Program to find the largest of 4 no using macros.
If there are 1 to 100 Numbers in array of 101 elements. Which is the easy way to find repeated number?
Can you write a function similar to printf()?