What will be the output of the following C code?
#include
typedef struct p
{
int x, y;
}k = {1, 2};
int main()
{
p k1 = k;
printf("%d\n", k1.x);
}
Answer: A
No answer description available for this question.
Enter details here
Which of the following is an example for non linear data type?
Answer: A
A data structure is said to be linear if its elements form a sequence or a linear list. For example array, linked list, queue, stack etc. Elements in a non linear data structure do not form a sequence. For example Trees, graphs etc.
Enter details here
Is the following declaration acceptable?
typedef long no, *ptrtono;
no n;
ptrtono p;
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
typedef struct student
{
char *a;
}stu;
void main()
{
stu s;
s.a = "hi";
printf("%s", s.a);
}s
Answer: A
No answer description available for this question.
Enter details here
Which of the following is an example of static memory allocation?
Answer: D
No answer description available for this question.
Enter details here
Queue data structure works on the principle of ____________
Answer: C
No answer description available for this question.
Enter details here
For the following “typedef” in C, pick the best statement
typedef int INT, *INTPTR, ONEDARR[10], TWODARR[10][10];
Answer: D
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
int *(*(x()))[2];
typedef int **(*ptrfoo)())[2];
int main()
{
ptrfoo ptr1;
ptr1 = x;
ptr1();
return 0;
}
int *(*(x()))[2]
{
int (*ary)[2] = malloc(sizeof * ary);
return &ary;
}
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
int (*(x()))[2];
typedef int (*(*ptr)())[2] ptrfoo;
int main()
{
ptrfoo ptr1;
ptr1 = x;
ptr1();
return 0;
}
int (*(x()))[2]
{
int (*ary)[2] = malloc(sizeof*ary);
return &ary;
}
Answer: A
No answer description available for this question.
Enter details here
typedef int (*PFI)(char *, char *)creates:
Answer: A
No answer description available for this question.
Enter details here