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 |
write a C++ programming using for loop: * * * * * * * * * *
Do vectors start at 0?
Does c++ support multilevel and multiple inheritances?
Why we use #include iostream in c++?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
Can we run c program in turbo c++?
Define a constructor?
What is meaning of in c++?
When does the c++ compiler create temporary variables?
What is a static member?
What is a virtual destructor?
Find out the bug in this code,because of that this code will not compile....... #include <iostream> #include <new> #include <cstring> using namespace std; class balance { double cur_bal; char name[80]; public: balance(double n, char *s) { cur_bal = n; strcpy(name, s); } ~balance() { cout << "Destructing "; cout << name << "\n"; } void set(double n, char *s) { cur_bal = n; strcpy(name, s); } void get_bal(double &n, char *s) { n = cur_bal; strcpy(s, name); } }; int main() { balance *p; char s[80]; double n; int i; try { p = new balance [3]; // allocate entire array } catch (bad_alloc xa) { cout << "Allocation Failure\n"; return 1; }