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 |
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4
How to count a sum, when the numbers are read from stdin and stored into a structure?
main() { printf("%x",-1<<4); }
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }
program to find the roots of a quadratic equation
14 Answers College School Exams Tests, Engineering, HP, IIIT, Infosys, Rajiv Gandhi University of Knowledge Technologies RGUKT, SSC,
prog. to produce 1 2 3 4 5 6 7 8 9 10
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
Cluster head selection in Wireless Sensor Network using C programming language.
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }