Tuesday, July 7, 2009

C programming TECHNICAL MCQ Exercise -1

Q. 1 . TurboC 3.0 is based on
a . DOS
b . UNIX
c . Windows
d . none

Q. 2 . Find the output.
void main()
{
int a=4,b=5;
printit(a, b);
}
printit(int b, int a)
{
printf("%d %d", a, b);
{
int a=0;
int b=1;
printf("%d %d", a, b);
}
}
a . 4 5 0 1
b . 5 4 0 1
c . 5 4 5 4
d . None of these



Q. 3 . The contents of a file will be lost if it is opened in
a . a mode
b . a- mode
c . w+ mode
d . a+ mode

Q. 4 . Find the output.
void main()
{
int i=1,j=2,k=3;
if(i==1)
if(j==2)
if(k==3)
{
printf("ok");
break;
}
else
printf("continue");
printf("bye");
}
a . ok
b . okbye
c . Misplaced break
d . None of these


Q. 5 . Find the output
void main()
{
printf("Lakshya\C\Academy");
}
a . LakshyaCAcademy
b . LakshyaAcademy
c . Lakshya
d . Lakshyacademy

No comments:

Blog List