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



struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,..

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

struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,..

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

struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,..

Answer / ricky dobriyal

/* 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

Post New Answer

More C Interview Questions

What are the restrictions of a modulus operator?

0 Answers  


Explain what is the heap?

0 Answers  


What is #line used for?

0 Answers  


What is New modifiers?

0 Answers   NA,


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

2 Answers   Mascot,


How many types of arrays are there in c?

0 Answers  


Why is main function so important?

0 Answers  


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

0 Answers  


struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));

2 Answers  


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?

0 Answers  


i need all types of question paper releted to "c" and other language.

0 Answers  


Categories