Bank exam questions and answers

Group exam questions and answers

Technical questions and answers

1. What will be output of following program?

#include
#include
int main(){
void (*p)();
int (*q)();
int (*r)();
p = clrscr;
q = getch;
r = puts;
(*p)();
(*r)("cquestionbank.blogspot.com");
(*q)();
return 0;
}
A. NULL B. Cquestionbank.blogspot.com
C. C D. Compilation error
2. What will be output of following program?

#include
#include
int main(){
char *ptr1 = NULL;
char *ptr2 = 0;
strcpy(ptr1," c");
strcpy(ptr2,"questions");
printf("\n%s %s",ptr1,ptr2);
return 0;
}
A. C questions B. C (null)
C. (null) (null) D. Compilation error
3. What will be output of following program?

#include
int main(){
int i = 3;
int *j;
int **k;
j=&i;
k=&j;
printf("%u %u %d ",k,*k,**k);
return 0;
}
A. Address, Address, 3 B. Address, 3, 3
C. 3, 3, 3 D. Compilation error
4. What will be output of following program?

#include
#include
int main(){
register a = 25;
int far *p;
p=&a;
printf("%d ",*p);
return 0;
}
A. 25 B. 4
C. Address D. Compilation error
5. What will be output of following program?

#include
#include
int main(){
char far *p,*q;
printf("%d %d",sizeof(p),sizeof(q));
return 0;
}
A. 2 2 B. 4 4
C. 4 2 D. 2 4
6. What will be output of following program?

#include
int main(){
int a = 10;
void *p = &a;
int *ptr = p;
printf("%u",*ptr);
return 0;
}
A. 10 B. Address
C. 2 D. Compilation error
7. What will be output of following program?

#include
#include
int main(){
int register a;
scanf("%d",&a);
printf("%d",a);
return 0;
}
//if a=25
A. 25 B. Address
C. 0 D. Compilation error
8. What will be output of following program?

#include
int main(){
char arr[10];
arr = "world";
printf("%s",arr);
return 0;
}
A. World B. W
C. Null D. Compilation error
9. What will be output of following program?

#include
#include
int main(){
int a = 5,b = 10,c;
int *p = &a,*q = &b;
c = p - q;
printf("%d" , c);
return 0;
}
A. 1 B. 5
C. -5 D. Compilation error
10. What will be output of following program?

#include
int main(){
int i = 5 , j;
int *p , *q;
p = &i;
q = &j;
j = 5;
printf("%d %d",*p,*q);
return 0;
}
A. 5 5 B. Address Address
C. 5 Address D. Compilation error
div itemprop="description">AptTree.com is enhanced solution for learning and training all categories of Group&bank Questions and Answers.
Date published: 01/01/2015
5 / 5 stars