main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above
Answers were Sorted based on User's Feedback
d) Some junk number because floating value is stored in
integer via pointer pf.
Is This Answer Correct ? | 15 Yes | 1 No |
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
main() { int i =0;j=0; if(i && j++) printf("%d..%d",i++,j); printf("%d..%d,i,j); }
main() { int i=5; printf("%d",++i++); }
What is the main difference between STRUCTURE and UNION?
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,