Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


#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);

}



#include<stdio.h> main() { struct xx { ..

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

Post New Answer

More C Code Interview Questions

what is the code of the output of print the 10 fibonacci number series

2 Answers  


How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


Is the following code legal? struct a { int x; struct a b; }

1 Answers  


Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

0 Answers  


Find the largest number in a binary tree

7 Answers   Infosys,


Who could write how to find a prime number in dynamic array?

1 Answers  


How to palindrom string in c language?

6 Answers   Google,


main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


how can i search an element in an array

2 Answers   CTS, Microsoft, ViPrak,


main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }

1 Answers  


void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }

1 Answers  


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


Categories