#include<stdio.h>
main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s=malloc(sizeof(struct xx));
printf("%d",s->x);
printf("%s",s->name);
}
Answer / susie
Answer :
Compiler Error
Explanation:
Initialization should not be done for structure members
inside the structure declaration
| Is This Answer Correct ? | 4 Yes | 1 No |
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
void main() { int i=i++,j=j++,k=k++; printf(ā%d%d%dā,i,j,k); }
How to count a sum, when the numbers are read from stdin and stored into a structure?
Is this code legal? int *ptr; ptr = (int *) 0x400;
write a program to Insert in a sorted list
main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }
main() { int c=- -2; printf("c=%d",c); }
program to find magic aquare using array
How to return multiple values from a function?
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }