C/C++ Programming Language – Set 3

New MCQ Questions set with Answer on the category of C/C++ Programming Language. In this set you will get 30 Objective Questions with Answer related to C/CPP Programming Language. Four options are given to each questions as possible answer but only one option is the correct one, first select your answer and tally with the given correct answer. Correct Answer are given below of this MCQ Question Set.


1 Which of the following is/are storage class
A. Automatic
B. Static
C. Allocated
D. All of Above

2 What will the output of following code
{
int x = 10, y = 15;
x = x++;
y = ++y;           

printf(“%d, %d \n”, x, y);
}

A. 10, 15
B. 10, 16
C. 11, 16
D. 11, 15

3 NULL Pointer can be used as
A. To stop indirection in a recursive data structure
B. As an error value
C. As a sentinel Value
D. All of Above

4 Which one of the following is not the advantages of functions?
A. Debugging is easier
B. Testing is easier
C. Recursive call is possible
D. It consumes low disk space

5 What is the result of the following statement?
x = y = z = 0;

A. x = 0, y = Null, z = Null
B. x = 0, y = 0, z = 0
C. x = 0, y = 1, z = 2
D. the statement is incorrect

6 What is the result of the following statement?
X = 10;
y = ++x;

A. x = 10, y = 10
B. x = 10, y = 11
C. x = 11, y = 10
D. x = 11, y = 11

7 Which of the following statement creates infinite loop?
A. for  (  ;  ;  )
B. while (  ;  ;  )
C. when (  ;  ;  )
D. if(  ;  ;  )

8 The use of “break” Statement
A. to terminate a case in the switch statement
B. to force immediate termination of a loop
C. Both A & B
D. Only A

9 to use the function tolower(), which of the following header file should include
A. string.h
B. conio.h
C. ctype.h
D. Don’t need any header file

10 What is the function overloading?
A. Calling a function from another function
B. Having more than one functions of same name
C. Calling a function from itself
D. There is no such term in C/C++

11. In C/CPP Programming strcmp() function is used for
A. Convert String to Char
B. Copy two Strings
C. Compare two Strings
D. None of these

12. In C/CPP Programming ‘\a’ is used for
A. Form feed
B. Line Brake
C. Select All
D. Alarm

13. Which of the following is the correct statement?
A. Variable name must start with underscore
B. Variable name must have digit
C. Variable name must have white space character
D. Keyword can not be a variable name

14. While coding in C/CPP Programming for “Call by Reference” we pass
A. Address of variable
B. Value of the variable
C. Either Value or Address
D. Both value and address

15. Which of the following is the symbol for AND operator?
A. ||
B. &
C. &&
D. $$

16. Which of the following is not the type of variable?
A. Extrern
B. Register
C. Global
D. None of above

17. Which of the following is the incorrect statement?
A. All array variables have same type
B. An array is the collection of variables
C. Array variables can be used individually
D. None of these

18. In C/CPP Programming array index is always starts from
A. 0
B. 1
C. 2
D. 3

19. In C/CPP Programming a function can return
A. Single value
B. Double Values
C. Many values
D. None of these

20. Which of the following is required to write and run C/CPP program?
A. Compiler
B. Text editor
C. Operating system
D. All of above

21 C/C++ program starts executing from
A. here()
B. main()
C. start()
D. begin()

22 In CPP Programming ‘++’ is ________ operator
A. Increment
B. Decrement      
C. Assigning
D. Overloading

23 In C++ Programming a pointer variable stores ________
A. Value of anther Value
B. Value of anther variable
C. Address of another value
D. Address of another variable

24 In C/CPP Programming array can be _________
A. Single Dimensional
B. Multi Dimensional
C. Non Dimensional
D. A & B

25 In C/CPP Programming an uninitialized variable may have
A. Null value
B. Null String
C. Garbage value
D. zero value

26 In C/CPP Programming which function is not related to file handling
A. fprintf();
B. printf();
C. fclose();
D. fopen();

27 In C/CPP Programming binary operator needs _______ operand.
A. No operand
B. One operand
C. Two operand
D. Three operand

28 A function which invokes itself repeatedly until some condition is satisfied is called ___________
A. Friend Function
B. Virtual Function
C. Recursive Function
D. Overloading Function

29 In C Programming which one of the following is string termination character?
A. ‘\0’
B. ‘\n’
C. ‘\b’
D. ‘\t’

30 In C/CPP Programming array can be sorted by using
A. Quick Sort
B. Bubble Sort
C. Merge Sort
D. All of above

Answers
1 – D / 2 – C / 3 – D / 4 – D / 5 – B / 6 – D / 7 – A / 8 – C / 9 – C / 10 – B
11 – C /1 2 – D / 13 – D / 14 – A / 15 – C / 16 – D / 17 – D / 18 – A / 19 – A / 20 – D
21 – B / 22 – A / 23 – D / 24 – D / 25 – C / 26 – B / 27 – C / 28 – C / 29 – A / 30 – D

Web School BD

বাংলাদেশের প্রথম অনলাইন ভিত্তিক ট্রেনিং সেন্টার "Web School BD". ওয়েব স্কুল বিডি : https://www.webschool.com.bd

Post a Comment

আপনার কোন কিছু জানার থাকলে কমেন্টস বক্স এ লিখতে পারেন। আমরা যথাযত চেস্টা করব আপনার সঠিক উত্তর দিতে। ভালো লাগলে ধন্যবাদ দিতে ভুলবেন না। শিক্ষার্থীরা নোট ,সাজেশান্স ও নতুন নতুন ভিডিও সবার আগে পেতে আমাদের Web School BD চ্যানেলটি সাবস্ক্রাইব SUBSCRIBE করতে পারো।
- শুভকামনায় ওয়েব স্কুল বিডি

Previous Post Next Post