C Technicals
C Technicals
There is technical round 0f 30 questions its optional between c or c++.choose c its very easy. Most of the questions
are from yeshwant kanitkar’s TEST YOUR C SKILLS
Book. Buy this book and prepare its, very nice.
ANS: DECLARATION
3>MAIN()
{
int i=-3,j=2,k=0,m;
m= ++j&&++i||++k;
printf(“%d%d%d”,i,j,k,m);
}
4>
main()
{
int i=-3,j=2,k=0,m;
m= ++j&&++i&&++k;
printf(“%d%d%d”,i,j,k,m);
}
5.>main()
{
const int i=7;
printf(“%d”,++i);
}
6>
#define I 6
main()
{
printf(“%d”,++I);
}
8>
MAIN()
{
printf(“%c”,7[“sundaram”]);
}
ANS: m
9>struct name
{
int a;
char b;
char n;
short s;
}n1;
main()
{
printf(“%d”,sizeof(n1));
10>
main()
{
enum{ m=2,n,o=60,p};
printf(“%d”,p);
}
ANS: 61
11>
IF A file contains the line “I am a boy\r\n” then on reading this line into the array str using fgets()
What would str contain?
12>
in command line enter myprog 1 2 3 what is output?
Main(int argc , char * argv[])
{
int I,j=0;
for(i=0;i<argc;i++)
j=j+atoi(argv[i]);
printf(%d”,j);
}
ANS: 6
13>
in command line enter myprog Friday Tuesday Thursday what is output?
Main(int argc , char * argv[])
{
printf(“%c”,**++argv):
}
ANS: f
14>
main()
{
printf(“%d”,-1>>4);
}
ANS: 0fff
ANS:25% LOSS
ANS: 5 CUPS
3> A SQUARE FIELD OF grass (5m*5m), at one corner a goat is tied with 3m long rope.
What is area of field available for a goat to eat grass?
4? A (3*3*3) CUBE IS PAINTED ON ALL SIDES, LATER IT CUT DOWN INTO (1*1*1) CUBES
WHAT IS MAX NUMBER OF CUBES WHICH ARE NOT PAINTED ON ANY OF ITS FACES?
ANS:16