struct node
{
int *a;
char *b;
char array[12];
};
struct node m,*n;
assign the value in *a,*b,char array[12]
Answers were Sorted based on User's Feedback
Answer / varun
m.a=(int*)malloc(4);
*(m.a)=2;
m.b=(char*)malloc(10);
m.b="hello";
strcpy(m.array,"world");
n=(struct node*)malloc(sizeof(struct node));
n->a=(int*)malloc(4);
*(n->a)=2;
n->b=(char*)malloc(10);
n->b="hello";
strcpy(n->array,"world");
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / aravind
struct node
{
int *a;
char *b;
char array[12];
};
struct node m,*n;
m->a*=5;
m->*b='c';
m.array[12]={"aravind");
Is This Answer Correct ? | 1 Yes | 2 No |
/* hello i am ricky dobriyal */
struct node
{
int *a;
char *b;
char array[12];
};
struct node m,*n;
n->a=10;
n->b='5';
m.array="ricky dobriyal";
Is This Answer Correct ? | 0 Yes | 2 No |
What are the restrictions of a modulus operator?
Explain what is the heap?
What is #line used for?
What is New modifiers?
Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4
How many types of arrays are there in c?
Why is main function so important?
Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));
Write a program to interchange two variables without using the third variable?
17 Answers Accenture, College School Exams Tests, Infotech,
How to establish connection with oracle database software from c language?
i need all types of question paper releted to "c" and other language.