Is the following code legal?
typedef struct a aType;
struct a
{
int x;
aType *b;
};
Answer / susie
Answer :
Yes
Explanation:
The typename aType is known at the point of declaring the
structure, because it is already typedefined.
| Is This Answer Correct ? | 4 Yes | 0 No |
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
writte a c-programm to display smill paces
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
how can i cast a char type array to an int type array
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
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); }
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }
main() { int c=- -2; printf("c=%d",c); }
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,