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

What is dangling pointer in c?

0 Answers  


1,1,5,17,61,217,?,?.

3 Answers   Apple,


WHAT IS LOW LEVEL LANGUAGE?

2 Answers  


What are the advantage of c language?

0 Answers  


Explain what happens if you free a pointer twice?

0 Answers  






Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

0 Answers  


What is preprocessor with example?

0 Answers  


Why header file is used in c?

0 Answers  


atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation

0 Answers  


What is difference between && and & in c?

0 Answers  


A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

2 Answers   Wipro,


If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.

12 Answers   Google,


Categories