Aditi Placement Question Papers




Aditi Placement Question Papers

Filed under:

Aditi Placement Question Papers

Sample Technical Questions

1. What would be the output of the following program.
#include
main()
{
extern int a;
printf("%d",a);;
}
int a=20;
(a) 20 (b) 0 © garbage value (d) error!!

2. What would be the output of the following program.
main()
{
int a[5]={2,3};
printf("n %d %d %d",a[2],a[3],a[4]);
}
(a) garbage value (b) 2 3 3 © 3 2 2 (d) 0 0 0

3. What would be the output of the following program.
main()
{
inti=-3,j=2,k=0,m;
m=++i&&++j||++k;
printf("n %d %d %d %d",i,j,k,m);
}
(a) -2 3 0 1 (b) -3 2 0 1 © -2 3 1 1 (d) error

4. What would be the output of the following program.
main()
{
int a,b;
a=sumdig(123);
b=sumdig(123);
printf("%d %d",a,b);
}
sumdig(int n)
{
static int s=0;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
s=s+d;
sumdig(n);
}
else return(s);
}
(a) 12 6 (b) 6 12 © 3 15 (d) error

5. What would be the output of the following program.
#define CUBE(x) (x*x*x)
main()
{
int a,b=3;
a=CUBE(b++);
printf("n %d %d",a,b);
}
(a) 64 4 (b) 27 4 © 27 6 (d) 64 6

6. What would be the output of the following program.
main()
{
const int x=get();
printf("%d",x);
}
get()
{
return(20);
}
(a) 20 (b) garbage value © error (d) 0

7. A function has this prototype void f1(int **x), How will you call this function?
(a) int **a; (b) int a; © int *a; (d) int a=5;
f1(a); f1(&a); f1(&a); f1(&&a);

8. pointout the error, if any, in the for loop
main()
{
int l=1;
for(;;)
{
printf("%d",l++);
if(l>10)
break;
}
}
(a) The condition in the for loop is a must (b) The two semicolons should be droppe © The for loop should be replaced by awhile loop (d) No error

9. Can the following piece of code be executed?
int main(void)
{
char strA[10]="compile",strB[10];
my_strcpy(strB,strA);
puts(strB);
}
char * my_strcpy(char *destination,char *source)
{
char *p=destination;
while(*source!=’

Related Plament Papers and Companies

Aditi Placement Question Papers

Aditi Placement Question Papers Sample Test paper 1. In a party 48 person r there,2/3 r men, remaining are women, half of women r doctor,no of doctor in party is----? 2. From a cuboids of 18*15*8 size how many 6*6*6 cube can be cut 3. The age of father is thrice then his son, after 15 yr the the father age is twice as the son, Find the age of father.ans-45 yr 4. Which is greater 30% of 40,5 more than the square of 3,aur are hi 2 the yad nahi hai. 5. A man purchase 3

Aditi Placement Question Papers

Aditi Placement Question Papers Sample Question Paper 1. Water and wine are in ratio 1:4. how much of water should be added to make it half-half. 2. A man gets 20 oranges for re.1 .and 25 oranges for re.1. He mixes them and sells 45 oranges for Re.2..Find his gain or loss % 3. A square of size 40 by 40..There are 4 circles each of radius 10.not overlapping but juzt touching each other inside the square..which % of the area of the square is not covered by the circles.? 4. Question on income and expenditure..A man spends 20% of his

  • Resources













  • Placement Papers Archives