Explore topic-wise MCQs in Technical MCQs.

This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.

1.

#include <stdio.h>typedef struct student    {        char *a;    }stu;    void main()    {        struct student s;        s.a = ""hey"";        printf(""%s"", s.a);    }
10.#definecan be used to define alias for values as well

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
E.
Answer» B. FALSE
2.

#include <stdio.h>typedef struct student    {        char *a;    }stu;    void main()    {        struct stu s;        s.a = ""hi"";        printf(""%s"", s.a);    }
9.What will be the output of the following C code?

A. Compile time error
B. varies
C. he
D. hey
Answer» E.
3.

string p = "HELLO";
7.typedef int (*PFI)(char *, char *)creates ___________

A. type PFI, for pointer to function (of two char * arguments) returning int
B. error
C. type PFI, function (of two char * arguments) returning int
D. type PFI, for pointer
Answer» B. error
4.

#include <stdio.h>#define TRUE  1 int main( ) {   printf( ""Value of TRUE : %d"", TRUE);   return 0;}
6.Which option should be selected to work the following C expression?

A. typedef char [] string;
B. typedef char [] string; and typedef char *string;
C. typedef char *string;
D. Such expression cannot be generated in C
Answer» D. Such expression cannot be generated in C
5.

__________ statements are processed by the pre-processor.

A. #def
B. typedef
C. type
D. #define
Answer» E.
6.

___________ is a C-directive which is also used to define the aliases for various data types.

A. #const
B. #def
C. #define
D. #dir
Answer» D. #dir
7.

can we use typedef to give a name to your user defined data types as well?

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
Answer» B. FALSE
8.

The C programming language provides a keyword called _________, which you can use to give a type a new name.

A. type
B. typedef
C. typed
D. tpdef
Answer» C. typed