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 header files and what are its uses in C programming?

0 Answers  


What is the mean of this statement:: if(int i=0 * i=9)

2 Answers   HCL,


What does static mean in c?

1 Answers  


Is r written in c?

0 Answers  


Q. where is the below variables stored ? - volatile, static, register

3 Answers   Bosch,






void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

0 Answers  


program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5

8 Answers   Aptech, Infosys,


A stack can be implemented only using array?if not what is used?

3 Answers   InterGlobal,


how many key words availabel in c a) 28 b) 31 c) 32

0 Answers  


differentiate built-in functions and user – defined functions.

0 Answers  


What is return in c programming?

0 Answers  


write a c program to check weather a particluar bit is set or not?

5 Answers   IBM,


Categories