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 |
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?
what is self refrential structure
Go through this linked list concept.While traversing through the singly linked list sometimes the following code snippet "while(head != NULL)" is used and other times "while(head->link != NULL)"is used(Here head is the pointer pointing to the first node,node has two parts data part and link part).What is the difference between head != NULL and Head->link != NULL and in which situation are they used?
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
What is void main ()?
What is the use of volatile?
what is real time system?what is the differance between hard and soft real time systems
What is a macro?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?