HCL Campus Interview Questions & Answers 2012

1. When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal would return
a. FAEKCDBHG
b. FAEKCDHGB
c. EAFKHDCBG
d. FEAKDCHBG

2. Find the output :

main( )
{
int z = 4;
printf( “%d”, printf(“ %d %d “, z, z));
}
a) 4 4 3 b) 4 4 5 c) 4 4 4 d) Error

3. What is the postfix form of the following prefix expression -A/B*C\$DE

(A) ABCDE\$*/- (B) A-BCDE\$*/-
(C) ABC\$ED*/- (D) A-BCDE\$*/

Ans:A
4. Find the output :

int x= 0x65;
main()
{
char x;
printf(“%d\n”,x)
}

a) compilation error b) ‘A’ c) 65 d) unidentified

5. integer x = 40, y = 35, z = 20, w = 10
Comment abt the o/p of d following two stmnts :print x * y / z – w
print x * y / (z – w)
a. Differ by 80
b. Same
c. Differ by 50
d. Differ by 160

6. Find the output :
main( )
{
int a[ ] = { 10, 20, 30, 40, 50};
int j;
for (j = 0; j < 5; j++)

{
printf(“ \n %d”, * a);
a ++;
}
}
a) 0..5 b) 0..4 c) Error d) None of the aboveAnswer : C

7. main( )
{
int z = 4;
printf( “%d”, printf(“ %d %d “, z, z));
}
a) 4 4 3 b) 4 4 5 c) 4 4 4 d) Error

8. Find the output :

main( )
{
static char str[ ] = { 48, 48, 48, 48, 48, 48, 48, 48, 48, 48};
char *s;
int i;
s = str;
for(i = 0; i <=9; i++)
{
if(*s)
printf(“%c”, *s);
s++;
}
}

a)0 0 0 0 0 0 0 0 0 0 b) 1 1 1 1 1 1 1 1 1 1 c) 48 48 48 48 48 48 48 48 48 48 d) None

9. Find the output :

main()
{
char *p=”hai friends”,*p1;
p1=p;
while(*p!=’\0′)
++*++p;
printf(“%s %s”,p,p1);
}

a. ibj!gsjfoet b. hbj!gsjfoet c. hbj!gsjfoet hbj!gsjfoet d. None

10. Find the output :

#include
main()
{
switch (5)
{
case 5: printf(” 5 “);
default: printf(” 10 “);
case 6: printf(” 6 “);
}
}
A. 5 B. 5 10 6 C. 5 10 D. 5 6

Parithi

ElamParithi Arul is Editor At Large and the Owner of Tech Twinklers. He is the founder of the Parithi Network. Basically being a 23 year old Whizkid, He's A Mac User. An Adventurer. A Tech Enthusiast, An Avid PC and PlayStation Gamer, A Hobbyist Photographer and a Nature Lover. His basic interests are developing Websites, Apps and coming up with various creative ideas for a better vibrant tomorrow. He is a professional blogger for about 4 years and writes blogs regarding technology, gaming, and about his own personal life. You can follow him on Twitter at @Parithi

Interview Tips

• saranraj
January 2, 2013 at 8:59 PM

• aishwarya
October 20, 2013 at 2:31 PM

plz give link for ece question banks 7th sem

Welcome To TechTwinklers!

Tech Twinklers is a Tech Blog run by Students with an aspiring enthusiasm in Technology and Gaming. This Blog will bring News about the Modern Technology, Educational Advances, Campus Interviews, etc. So make sure you subscribe to our blog because we don't want you to miss a thing that is posted here..

January 16, 2012

Tata Docomo Vs AirTel : Docomo is a Clear Winner?

November 15, 2011

October 3, 2012

October 20, 2012

October 10, 2011