Data Type Questions with Answers
Q1.What will be output of following program ?
void main()
{
char i=13;
clrscr();
while(i)
{
i++;
}
printf("%d",i);
getch();
}
Output: 0
Q2.What will be output :
void main()
{
float a= -3.3f;
int i;
unsigned char *p=&a;
for(int i=0;i<4;i++)
{
printf(“%d “,*p); p++;
}
}
Ans : Output : 52 52 83 192
Q3.What will be output:
void main()
{
int a=5,b=6,c=7;
printf(“%d,%d,%d”);
}
Ans:
Output: 7 6 5
Explanation:
Default sotrage class int a=5 is auto.Since it automatic variable it
will create in the stack area.It will store in the stack as:
Stack always follows LIFO datastructure.In the printf statement
name of variable is not written explicitly.So default output will
content of Stack which will be in the LIFO order i.e 7 6 5.
(memory map)
Blog List
-
The Vera Zvonareva Picture
-
*Vera Zvonareva*
NEW YORK CITY, NEW YORK
*V. ZVONAREVA/K. Kanepi6-3, 7-5*
THE MODERATOR: Questions, please.
*Q. Crazy, crazy kind of weather out...
13 years ago
-
Cricketers and Bizarre nicknames
-
*Cricketers are known for the innovative strokes they execute; the
different ways they work out to outwit batsmen and not forgetting the
captains who spe...
13 years ago
-
Deepika Padukone in Dum Maro Dum
-
Baffling wasn't it? So was it for Deepika Padukone. The actress was
recently offered Rs. 4 crores by a wealthy NRI family in London to perform
the four m...
13 years ago
-
C programming Language Technical Interview Questions and Answers
-
Predict the output or error(s) for the following:
*8. # include*
*aaa() {
printf("hi"); }bbb(){ printf("hello"); }ccc(){ printf("TechPrepa...
13 years ago
-
Happy new year SMS
-
*H *ours of happy times with friends and family
*A *bundant time for relaxation
*P *rosperity
*P *lenty of love when you need it the most
*Y *outhful excitem...
13 years ago
-
Placement Questions With Solution of C/C++ Programming
-
Technical Placement C++ Question with Solution CLICK HERE FOR MORE...
1. void main()
{
int a, *pa, &ra;
pa = &a;
ra = a;
cout <<"a="<
c++ placement interv...
13 years ago
-
Aaj Kuchh Maangtee Hoon Priya - Manoshi Chatterjee
-
आज कुछ माँगती हूँ प्रिय
आज कुछ माँगती हूँ मैं
प्रिय क्या दे सकोगे तुम?
मौन का मौन में प्रत्युत्तर
अनछुये छुअन का अहसास
देर तक चुप्पी को बाँध कर
खेलो अपने ...
15 years ago
-
No comments:
Post a Comment