#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 |
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
main() { int i=5; printf(ā%dā,i=++i ==6); }
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
main() { int c=- -2; printf("c=%d",c); }
main() { extern out; printf("%d", out); } int out=100;
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
Is this code legal? int *ptr; ptr = (int *) 0x400;
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);