Oracle Technical-C question with answers |   21042

Oracle Technical-C question with answers

Oracle previous years solved questions of technical C questions,Orcale previous years solved question papers,Orcle free on line mock tests

 

 

Oracle Job Interview Latest Placement Paper Solved questions of C
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,
HyderabadBangalore

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 oracle

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
Ans: A

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();

feedback