Beruflich Dokumente
Kultur Dokumente
Aranya 2008
REVERSE GEAR
P R E L I M N A RY R O U N D
Team Name:_____________________________
Members Details:
Rules:
1.
Q1. Which of the following gives odd no. if m is any whole no?
a) m2 d) m3
b) m2+m+1
c) 3m+2 None of the above
#include<stdio.h>
#include<conio.h>
int main()
int k = 5;
printf("%d\n", k);
a) 5 d) 8
b) 6 e) Other:________________________ ______
c) 7
#include<stdio.h>
#include<conio.h>
int main()
Reverse Gear 3
Aranya 2008
int a=x,b=y,c=z;
if (a>b)
if(b>c)
s1;
else s2;
getch();
}
Statement s2 will be executed if
Q4) Given that a,b,c,d,e each represent one of the digits between 1-9 and that the following
multiplication holds
abcde
* 4 (Multiply by 4)
----------
edcba
(a) 4 (d) 8
(b) 6 (e) None of the above is possible.
(c) 7
(a) 1 (e)
(b) 2 Other:________________________________________________
(c) 0 _____
(d) Execution Error
Q7) What is the output of the following program, if it is compiled and executed
without any command line arguments?
#include<stdio.h>
#include<conio.h>
printf("%d",argc);
}
a) 0 e)
b) 1 Other:________________________________________________
c) 2 ___________
d) Garbage Value
Q8) What will be the output of the following code, given input 5, 6?
#include<conio.h>
#include<stdio.h>
int main()
{
Reverse Gear 5
Aranya 2008
int a,b;
scanf("%d%d",a,b);
printf("%d+%d=%d",a,b,’a’+b);
}
A) 5+6=5 D) 5+6=71
B) 5+6=50 E) None of the Above
C) 5+6=11
Q10) History
(a) 8 (d)20
(b) 26 (e) Other:________________________
(c) 18
#include<conio.h>
#include<stdio.h>
int main()
printf("%d %d",7);
}
a) 7 garbage_value d) 7
b) 70 e)
c) Compilation Error Other:______________________________________________
#include<conio.h>
#include<stdio.h>
int main()
int a, b, c, abc = 0;
a = b = c = 40;
Reverse Gear 7
Aranya 2008
if (c) {
int abc;
abc = a*b+c;
}
a) Compilation Error d) c = 40, abc = 0
b) Runtime Error e) Other _________________________________
c) c = 40, abc = 1640
e) e h) k
f) n
g) t none of these
#include<conio.h>
#include<stdio.h>
int main()
int a=1;
a = a + + + + + + + + + + + + + + + +
+ + + + + + + + - +a;
printf ("a=%d\n",a);
Reverse Gear 8
Aranya 2008
}
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++;
a=++a;
printf(“%d”,a);
}
a) 52 d) 50
b) 41 e) Other
c) 51 ______________________________________________
#include<conio.h>
#include<stdio.h>
int main()
Reverse Gear 9
Aranya 2008
char *p=""s"Hello";
printf("%s",p);
}
(a) sHello (d) Compilation error
(b) s (e)Other:______________________________
(c) Hello ___
#include<stdio.h>
#include<conio.h>
int main()
int new=32767;
new = new/-32768;
printf("%d",new);
}
(a) 0 (d)Compilation Error
(b) 1 (e)Other:_____________________________________________
(c)-1 ____
Q21) Which of the following statement can be used to terminate the program at s?
#include<stdio.h>
#include<conio.h>
Reverse Gear 10
Aranya 2008
int main()
int new=32767;
s;
new = new/-32768;
printf("%d",new);
}
(a) return 0 (d)end
(b) break (e) None of the above
(c) continue
Q 22. What will be the next entry in the second row? There might be more than 1
entries in 1st and 3rd rows before that.
AEFHIK
BDGJ
a) L d) P
b) M e) None of these
c) N
Find
444
+444
--------
a) 1330 d)1333
b)1332 e) None of these
c) 1443
Reverse Gear 11
Aranya 2008
#include<conio.h>
#include<stdio.h>
int main()
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
(a) 5 0 1 (d) 5 10 2
(b) Compilation Error (e) Other:______________________
(c) 5 7 3
#include<iostream>
#include<conio.h>
#include<stdio.h>
int main()
printf("%c",'d'+9);
Reverse Gear 12
Aranya 2008
}
a) d d) Compilation error
b) m e) Other: ________________________________
c) 9
Q26) What will be the output of the following code if the keyboard input is
123456789?
#include<stdio.h>
#include<conio.h>
int main()
int i=7;
printf("%d",scanf("%d",&i));
(a) 9 (d) 1
(b) Compilation Error (e) Other:_____________________________________
(c) Garbage Value
Q27) How many digits of the decimal no. system are there such that they do not come in as unit’s
place of any perfect square less than 499?
(a) 4 (d) 0
(b) 3 (e)Other:_________________________
(c) 2
Reverse Gear 13
Aranya 2008
Q28) B is 6km East of A. C is 8km North of B. D is 12km East of C. E is 16km North of D.What
is the distance b/w A and E?
#include<conio.h>
#include<stdio.h>
int main()
int a[]={5,4,3,2,1};
int x,y;
int *p=&a[2];
*p++;
x=++*p;
y=*(p++);
printf("%d %d",x,y);
(a) 3 2 (c)3 4
(b)4 3 (d)3 3
Reverse Gear 14
Aranya 2008
(e)Other:______________________________
____________
Q30) What will be the maximum area of a quadrilateral having perimeter of 20m?
(a) 100m2
(b) Can’t be determined.
(c) 25m2
(d) 24 m2
(e) Other:_____________