Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
838 views

C Programming MCQ Questions

This document contains 5 multiple choice questions about C programming concepts like functions within classes, pointer definitions, header files, and accessing structure members. Each question is followed by the correct answer and a brief explanation. The questions cover topics such as member functions, boolean operators, pointers, header files for standard functions, and using the dot operator with structure variables.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
838 views

C Programming MCQ Questions

This document contains 5 multiple choice questions about C programming concepts like functions within classes, pointer definitions, header files, and accessing structure members. Each question is followed by the correct answer and a brief explanation. The questions cover topics such as member functions, boolean operators, pointers, header files for standard functions, and using the dot operator with structure variables.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

C Programming MCQ Questions & Answers Pdf

Question: 1

In C++, a function contained within a class is called

(A) a method

(B) a class function

(C) member function

(D) none of these

Ans: C

member function

Question: 2

The && and || operators compare two

(A) boolean values

(B) boolean value

(C) numeric values

(D) numeric value

Ans; B

boolean value

Question: 3
A pointer is

(A) address of a variable

(B) a variable for sorting address

(C) data type of an address variable

(D) indication of the variable to be accessed next

Ans: B

a variable for sorting address

Question: 4

The function abort() is declared in the header file

(A) <math.h>

(B) <iostream.h>

(C) <stdio.h>

(D) <stdlib.h>

Ans: B

<iostream.h>

Question: 5

In C++, when accessing a structure member, the identifier to the


left of the dot operator is the name of

(A) structure tag


(B) structure member

(C) structure variable

(D) keyword struck

Ans: C

structure variable

You might also like