The number of distinct nodes the following struct declaration can point to is
struct node
{
struct node *left;
struct node *centre;
struct node *right;
};
Answer: A
The number of distinct nodes the following struct declaration can point to is All of the above.
Enter details here
#include >stdio.h>
typedef enum{
Male, Female=-1
}SEX;
int main()
{
SEX var = Male;
SEX var1 = Female;
printf("%d %d",var, var1);
return 0;
}
Answer: D
No answer description available for this que
Enter details here
Which of the following accesses a variable in structure b?
Answer: B
No answer description available for this question
Enter details here
What is the output of this program?
#include
int main()
{
union demo {
int x;
int y;
};
union demo a = 100;
printf("%d %d",a.x,a.y);
}
Answer: D
You cannot initialize an union variable like this.
Enter details here
What is the output of this program?
#include
void main()
{
struct number
{
int no;
char name[20];
};
struct number s;
s.no = 50;
printf("%d", s.no);
}
Answer: D
No answer description available for this question
Enter details here
size of union is size of the longest element in the union
Answer: A
Max size of the union is the size of the largest data type or the memory taken by largest member.
Enter details here
It is not possible to create an array of pointer to structures.
Answer: B
Making sure of the length has nothing to do with whether you assign or copy. You cannot assign to an array in C, ever. The language doesn't allow it.
Enter details here
Which of the following structure declaration will throw an error?
Answer: D
No answer description available for this question.
Enter details here
The following C declarations
struct node
{
int i;
float j;
};
struct node *s[10] ;
define s to be
Answer: A
No answer description available for this question.
Enter details here
Anyone of the followings can be used to declare a node for a singly linked list. If we use the first declaration, “struct node * nodePtr;” would be used to declare pointer to a node. If we use the second declaration, “NODEPTR nodePtr;” can be used to declare pointer to a node.
/* First declaration */
struct node {
int data;
struct node * nextPtr;
};
/* Second declaration */
typedef struct node{
int data;
NODEPTR nextPtr;
} * NODEPTR;
Answer: B
No answer description available for this question.
Enter details here