Global
Guideline
Comprehensive Job Interviews
Home
Interview Questions
Online Quiz Tests
Blog
Contact Us
Close Menu
Copyright © 2005 - 2024. All Rights Reserved
Search
Home
Interviews
Technology Errors
C C++ Errors
C C++ Errors Question:
void main()
{
int i=7;
printf("N= %*d",i,i);
}
Tweet
Share
WhatsApp
Download PDF
Answer:
Its output would be 7,
"%*d"
here * symbol doesn't affect of operation of %d.
so 7 is set to value in variable i.
Download C C++ Errors PDF
Read All 13 C C++ Errors Questions
Previous Question
Next Question
What is run time error?
void main()
{
int i=5,y=3,z=2,ans;
clrscr();
printf("%d",++i + --z + i++ + --i * ++y);
i=5,y=3,z=2;
ans=++i + --z + i++ + --i * ++y;
printf("n%d",ans);
getch();
}
Its output is 37 and 31....
Please explain me why its different
How it works?