techpreparation-homepage

Home  Interview Questions  Certifications  Aptitude Questions  Tutorials  Placement Papers  Search  Resume  Soft Skills  Video  Forum  Blog


IT Placement Papers

3i-Infotech Placement Papers
Accenture Placement Papers
Infosys Placement Papers
Adobe Placement Papers
                              .........More

Technical Interview Questions
Networking Interview Questions
C Interview Questions
                              .........More

Resume Guide for Jobseekers
Resume - Action words
Resume To-Do List
                              .........More

Soft Skills
Communication Skills
Leadership Skills
                              .........More

 

 

  

Global Edge Placement Paper


11. main()
{
int a=10,20;
a^=b^=a^=b;
printf("%d\n %d\n",a,b);

a)a=20,b=10 b)a=10,b=20 c)Syntax error d)Unpredictable

Ans : a=20 b=10
12. main() {

int i=10;

switch(i) {
case 10: printf("Hello "); {
case 1 : printf("World ");
}
case 5: printf("Hello World ");
}
}



a) Hello b) Hello c) Hello World Hello World d) Syntax Error.

Ans : Hello World Hello World
13. main() {
char str1[]="Hello";
char str2[]="Hello";
if ( str1==str2 )
printf("True\n");
else
printf("False\n");
}
Ans: False.
a)True b)False c)Error d) Unpredictable.

15. main()
{
# include <stdio.h>
int i = 10 ;
printf("%d\n", i/2 );

}
a)10 b)5 c)error d) warning.
ans : 5

16. #include <stdio.h>
# pragma pack(2)

struct SIZE {
int i;
char ch ;
double db ;
} ;
main () {
printf ( "%d\n",sizeof(struct SIZE) );
}
a)12 b)14 c)16 d)8

main()
{ int arr[]={ 1,2,3,4 };
int *ptr ;;;;
ptr++ = arr;
printf("%d,%d",ptr[2],arr[2]);
return 0;
}
what is the output :

a> compile time error :multiple termination statements for pointer
b> lvalue required for ptr
c> prints 3 3
d> printd 4 3

ans b: lvalue required for ptr;

2>
main()
{
char s[10];
scanf ("%s",s);
printf(s);
}

what is the output if input is abcd :

a> prints abcd
b> compiler error
c> prints abcd and 6 junk characters
d> printd s

ans a: prints abcd.

3>
main()
{
char c = 255;
printf ("%d",c);
return 0;
}

what is the output

a> illegal character assignment
b> prints -1
c> prints 2
d> prints 255

ans b: prints -1.

4>
main()
{
int i;
for (i=7;i<=0;i--)
printf ("hello\n");

}

what is the output

a> prints hello 7 times
b> prints hello 8 times
c> prints hello once
d> prints nothing

ans b: prints nothing.

5>main()
{
printf( printf ("world") );

}

a> prints world
b> prints printf ("world")
c> prints nothing
d> compiler error

ans d: compiler error.

Page No :  1         2          3          4

Check Aptitude Interview Questions for more Aptitude Questions

Check Placement Papers for more IT Companies Paper.