Is the following statement a declaration/definition. Find
what does it mean?
int (*x)[10];
Answer / susie
Answer :
Definition.
x is a pointer to array of(size 10) integers.
Apply clock-wise rule to find the meaning of this definition.
| Is This Answer Correct ? | 3 Yes | 1 No |
void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
Sir... please give some important coding questions asked by product companies..
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
Finding a number multiplication of 8 with out using arithmetic operator
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines