main()
{
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);
}
Answer / susie
Answer :
Compiler Error: Undefined structure date
Explanation:
Inside the struct definition of ‘student’ the member of type
struct date is given. The compiler doesn’t have the
definition of date structure (forward reference is not
allowed in C in this case) so it issues an error.
| Is This Answer Correct ? | 1 Yes | 0 No |
Is the following code legal? struct a { int x; struct a *b; }
How will u find whether a linked list has a loop or not?
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
main() { int i=400,j=300; printf("%d..%d"); }
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error
main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000
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.
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
how to concatenate the two strings
main() { char a[4]="HELLO"; printf("%s",a); }
Write a program that reads a dynamic array of 40 integers and displays only even integers