25. | What will be output of following c program? #include
int main(){
float *p=(float *)1000;
float *q=(float *)2000;
printf("Difference=%d",q-p);
return 0;
}
|
|||||||
|
26. | main() {
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++) {
printf(" %d ",*c);
++q; }
for(j=0;j<5;j++){
printf(" %d ",*p);
++p; }
}
|
|||||||
|
27. | main() {
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
}
|
|||||||
|
28. | What will be output if you will execute following code? #include
int * function();
int main(){
auto int *x;
int *(*ptr)();
ptr=&function;
x=(*ptr)();
printf("%d",*x);
return 0;
}
int *function(){
static int a=10;
return &a;
}
|
|||||||
|
29. | main() {
char *p;
printf("%d %d ",sizeof(*p),sizeof(p));
}
|
|||||||
|
30. | What will be output if you will execute following code? #include
char * call(int *,float *);
int main(){
char *string;
int a=2;
float b=2.0l;
char *(*ptr)(int*,float *);
ptr=&call;
string=(*ptr)(&a,&b);
printf("%s",string);
return 0;
}
char *call(int *i,float *j){
static char *str="careersadda.com";
str=str+*i+(int)(*j);
return str;
}
|
|||||||
|
« previous
1
2
3
4
5
6
7
8
9
...next »