main()

{

struct date;

struct student

{

char name[30];

struct date dob;

}stud;

struct date

{

int day,month,year;

};

scanf("%s%d%d%d", stud.rollno, &student.dob.day,
&student.dob.month, &student.dob.year);

}



main() { struct date; struct student { char name[30]; ..

Answer / susie

Answer :

Compiler Error: Undefined structure date

Explanation:

Only declaration of struct date is available inside the
structure definition of ‘student’ but to have a variable of
type struct date the definition of the structure is required.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


Find the largest number in a binary tree

7 Answers   Infosys,


Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false

1 Answers   Cognizant, lenovo,


main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }

2 Answers  


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

0 Answers   Microsoft,






Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

9 Answers   Microsoft,


main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

5 Answers   HCL,


what is oop?

3 Answers  


to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD

6 Answers   Synergy,


Is it possible to print a name without using commas, double quotes,semi-colons?

7 Answers  


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.

19 Answers   Amazon, BITS, Microsoft, Syncfusion, Synergy, Vector,


Categories