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...


what would be the output of the follwing

struct st
{
char name[20];
int i;
float f;

};
main()
{
struct st emp = {"forum"};
printf("%d %f",emp.i,emp.f);

}

Answers were Sorted based on User's Feedback



what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / maruthi

Answer:0,0

Because if 1 element is initialised in structure or array
the remaining elements are initialised to 0 by default.

Is This Answer Correct ?    8 Yes 2 No

what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / ajay

0 0.000000

Is This Answer Correct ?    5 Yes 0 No

what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / rama krishna sidhartha

0,0.000000

Is This Answer Correct ?    3 Yes 0 No

what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / karthik

0, 0.00

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Interview Questions

HOW TO HANDLE EXCEPTIONS IN C

8 Answers  


Process by which one bit pattern in to another by bit wise operation is?

0 Answers   InterGraph,


What is clrscr ()?

0 Answers  


What are local and global variables?

3 Answers  


What do header files do?

0 Answers  


Explain how do you determine the length of a string value that was stored in a variable?

0 Answers  


for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable

2 Answers  


can we initialize all the members of union?

2 Answers  


main() { int a=5; printf(?%d,%d,%d\n?,a,a< <2,a>>2); } Answer: 5,20,1 please explain this code in detail

6 Answers   TCS,


ratio,age,persentage

0 Answers  


Find occurence of a character in a sting.

3 Answers   TCS,


ATM machine and railway reservation class/object diagram

0 Answers   Zycus Infotech,


Categories