0% found this document useful (0 votes)
87 views3 pages

C Technicals

interview questions
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views3 pages

C Technicals

interview questions
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

TECHNICAL ROUND C TIME:30 MIN

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.

NOTE;1>QESTIONS ARE NOT IN ORDER.


2> DATA MAY VARY, BUT QUESTIONS LIKE THIS.
1> main
{
int a[5]={2,3};
printf(“%d%d%d”,a[2],a[3],a[4]);
}
ANS: 0 0 0

2> extern int I;


is it a declaration or definition?

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);
}

ANS: COMPILATION ERROR

6>
#define I 6
main()
{
printf(“%d”,++I);
}

ANS: COMPILATION ERROR

7>if array begins at position 1002


main()
{
int a[2][3][4]={{1,2,3,4,5,6,7,8,9,1,1,2},{2,3,4,7,6,7,8,9,0,0,0,0}};
printf(“%d%d%d%d”,a,*a,**a,***a);
}

ANS: 1002 1002 1002 1

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?

ANS:”I am a boy \n\0”

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

THAT’S ALL I REMEMBERED ON C

APTITUDE SECTION TIME: 30MIN

MOST OF THE QUESTIONS FROM R S AGARWAL BOOK

1>ONE PROBLEM IS ON GAIN OR LOSS?

ANS:25% LOSS

2>A QUESTION ON SOME BOY BREAK CUPS, HOW MANY HE BROKES?

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?

ANS: PI* 3*3/4

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?

5>HOW MANY FACES, EDGES,VERTICES ON CUBE?

6>A COMPANY IS RECRUITING FRESHERS ON C OR C++. 241 MEMBERS ARE APPLIED.


40 PERSONS RESUME ARE DISCARDED FOR THEY DON’T KNOW C OR C++. 185 PEOPLE KNOW
C++ AND 186 PEOPLE KNOW C, HOW MANY PEOPLE KNOW ONLY C?

ANS:16

You might also like