Answer Posted / raj kumar
struct can hold multiple data types.
Like u can define a date structure....
but union can multiple data types which includes struct also
union x
{
int x;
struct
{
...
...
}
}
| Is This Answer Correct ? | 2 Yes | 7 No |
Post New Answer View All Answers
How can I prevent another program from modifying part of a file that I am modifying?
Why shouldn’t I start variable names with underscores?
What are data structures in c and how to use them?
What is the use of static variable in c?
The difference between printf and fprintf is ?
pierrot's divisor program using c or c++ code
Is the exit() function same as the return statement? Explain.
What is pass by reference in c?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
The file stdio.h, what does it contain?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is your stream meaning?
What are the header files used in c language?
What is structure data type in c?