Professional Documents
Culture Documents
Aranya 2008
KNIGHT CODERS
P R E L I M N A RY R O U N D
Team Name:_____________________________
Members Details:
Rules:
1.
#include<stdio.h>
#include<conio.h>
a) c d) Execution error
b) 99 e) Other:________________________ ______
c) Compilation Error
#include<stdio.h>
#include<conio.h>
int main()
printf("%d",printf("ABC\\"));
getch();
Knight Coders 3
Aranya 2008
Q4) What will be the average angle at center? Assume that the intersection point of
circle as intersection point.
(a)10 degree (d)Cant be determined
(b)18 degree (e)None of them
(c)60/7 degree
b) 6/(6^7)
Q5) What will be probability of getting word ARANYA, c) 3/(6^6)
if 6 letters are randomly picked from A, C, N, R, S, Y. d) 1/(4^6)
Repetition of letter is allowed e) None of these
a) 6!/(6^6)
#include<conio.h>
#include<stdio.h>
int main()
int i;
char a[]="\0";
if(printf("%s\n",a))
else
printf("Forget it\n");
Knight Coders 4
Aranya 2008
getch();
}
(a) Forget it (e)
(b) Ok here Other:________________________________________________
(c) 0 _____
(d) Execution Error
#include<stdio.h>
#include<conio.h>
int compute(int n)
if(n>0)
n=compute(n-3)+compute(n-1);
return(n);
return(1);
int main()
printf("%d",compute(5));
Knight Coders 5
Aranya 2008
getch();
}
a) 6 e)
b) 9 Other:________________________________________________
c) 12 ___________
d) 13
#include<stdio.h>
#include<conio.h>
int main()
int i;
for(i=0;i<3;i++)
int i=100;
i--;
printf("%d..",i);
getch();
}
(a)0..1..2.. (d)99..99..99..
(b)99..98..97.. (e)Other:______________________________
(c)100..100..100.. ___
Knight Coders 6
Aranya 2008
#include<conio.h>
#include<stdio.h>
int main()
printf("c=%d",c);
Q10) abcd
*2
__________
edcba
Find the value of d
a)6 d)8
b)1 e)Other:_______________________
c)3
Q12) A fair coin is tossed 10 times. Find the probability that 2 heads don’t occur
simultaneously.
a)1/2^4 d)1/2
b)1/2^5 e)None of these
c)1/2^3
#include<stdio.h>
#include<conio.h>
int main()
int a[]={10,20,30,40,50};
int *p;
printf("%d",*p);
getch();
}
a) 10 d) Compilation Error
b) 20 e)
c) 30 Other:______________________________________________
#include<stdio.h>
#include<conio.h>
int main()
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
getch();
}
a) 10 15 d) 11 15
b) 11 16 e) Other _________________________________
c) 10 16
#include<conio.h>
#include<stdio.h>
int main()
int a=1;
Knight Coders 9
Aranya 2008
a = a + + + + + + + + + + + + + + + +
+ + + + - + + - + a;
printf ("a=%d\n",a);
}
a) 2 e) Other _______________
b) Compilation Error __________________________________
c) Execution Error
d) 0
#include<conio.h>
#include<stdio.h>
int main()
int a=50;
a=++a;
printf(“%o”,a);
}
a) 51 d) 50
b) 61 e) Other
c) 63 ______________________________________________
#include<conio.h>
#include<stdio.h>
Knight Coders 10
Aranya 2008
int main()
printf("%d\n",i);
}
(a) Compilation Error (d) 1
(b) Runtime Error (e)Other:______________________________
(c) -1 ___
#include<conio.h>
#include<stdio.h>
int main()
j=a;
printf("%d",*j);
}
(a) Compilation error (d)512
(b) 1000 (e)Other:_____________________________________________
(c)01000 ____
Q21) Which of the following statement can be used to terminate the program at s?
#include<conio.h>
Knight Coders 11
Aranya 2008
#include<stdio.h>
int main()
int x,y,z;
x=2;
y=5;
z=x+++y;
printf("%d %d %d",x,y,z);
}
(a) Compilation Error (d)3 6 8
(b) 2 6 8 (e) None of the above
(c) 3 5 7
Q 22. The sum of reciprocal and fraction equals 85/18.Find the fraction.
a)2/6 d)4/9
b)2/3 e)None
c)2/9
Q23) The sum of the third and the ninth term of an AP is 10.Find a possible sum of
first 11 terms of this A.P.
a)55 d)None of these
b)44 e)All of the above
c)66
#include<conio.h>
Knight Coders 12
Aranya 2008
#include<stdio.h>
int main( )
int i, j, temp;
i=5;
j=10;
temp=0;
if( i > j)
swap( i, j );
}
a) 10 5 10 d) Compilation error
b)10 5 5 e) Other: ________________________________
c) 10 0 0
#include<conio.h>
#include<stdio.h>
int main()
{
Knight Coders 13
Aranya 2008
float me = 1.1;
if(me==you)
else
Q28) A cistern is normally filled in 5 hours. However it takes 6 hrs when there is a
leak in its bottom. If the cistern is full, in what time should cistern be empty.
a)6h b)5h
c)30h d)15h
e)Other
#include<conio.h>
#include<stdio.h>
Knight Coders 14
Aranya 2008
int main()
if(--i){
main();
printf("%d ",i);
Q30) A sum of money becomes 7/4 of itself in 6 years at a certain rate of simple
interest. Find the rate of interest
a)12% b)12(1/2)%
c)8% d)14%
e)Other