adp imgReasoning

DIRECTIONS : (1 -5)

If in a Certain language , ENTRY is coded as 12345 and STEADY is coded as 931785, then state which is the correct code for each of the given words.

 1. TENANT

A.  956169                  B.  196247

C.  352123                  D.  312723


2. SEDATE

  A. 918731                   B. 954185

C. 814195                   D. 614781

3. NEATNESS

A.  25196577              B.  21732199

C.  21362199              D.  21823698

4. ARREST

A.  744589                  B.  744193

C.  166479                  D.  745194

5. ENDEAR

A.  524519                  B.  174189

C.  128174                  D.  124179

Computer Knowledge

1.void main()

{

struct a

{

char ch[10];

char *str;

};

struct a s1={“Hyderabad”,”Bangalore”};

printf(“\n%c%c”,s1.ch[0],*s1.str);

printf(“\n%s%s”,s1.ch,s1.str);

getch();

}

Ans: HB, HyderabadBangalor

2. main(int argc,int *argv[])

{

int i;

for(i=1;i<argc;i++)

printf(“\n%s%s”,argv[i],(i<argc-1)?””:””);

return 0;

getch();

}

Ans: I work for Adp

3.void main()

{

int i,j,k;

for(i=0;i<3;i++)

k=sum(i,i);

printf(“\n%d”,k);

getch();

}

sum(s,t)

{

static int m;

m+=s+t;

return m;

}

Ans: 6

4.void main()

{

int i;

clrscr();

for(i=1;i<6;++i)

switch(i)

{

case 1:

case 2: printf(“%d,”,i++);break;

case 3: continue;

case 4: printf(“%d,”,i);

}

printf(“%d”,i);

getch();

}

Ans: 1,4,6

 5.Which of the storage class(es) becomes the global variables for the entire Program

(A) Extern

(B) Static

(C) Auto

(D) Register

6. What is the output of the program

void main()

{

char s[]=”oracle is the best”;

char t[40];

char *ss,*tt;

while(*tt++=*ss++);

printf(“%s”,t);

getch();

}

A. oracle is the best

B. Core dump

C. Error Message

D. Goes into infinite loop

7. What is the output of the program

void main()

{

int j[10]={9,7,5,3,1,2,4,6,9};

int i=1;

clrscr();

for(;i<9;i++)

printf(“%d “,–j[i++]);

getch();

}

// A. 6,2,1,5

// B. 6,2,1,5,7

// c. Error Message

// D. core dump

8. What is the output of the program

void main()

{

int i,j,k,n=5;

clrscr();

for(i=5;i>0;i–)

{

j=1<i;

k=n&j;

k==0?printf(“0”):printf(“1”);

}

getch();

}

// A. 00011

// B. 11110

// c. 11001

// D. 11100

9.Which of the following storage class(es) became the global variable for the entire program

A. Extern

B. Static=20

C. Auto

D. Register

10.//What is the output of the program, if integer occupies 2 bytes memory?

union

{

int a;

char b;

char c[10];

}u1;

void main()

{

int l=sizeof(u1);

printf(“%d”,l);

getch();

}

// A. 13

// B. 10

// c. 16

// D. None of the above

You may also like

Leave a Comment