0% found this document useful (0 votes)
9 views

C Question Paper

Uploaded by

hindi lyrics
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

C Question Paper

Uploaded by

hindi lyrics
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

INFORMATION TECHNOLOGY AND TECHNICAL EDUCATION COUNCIL, DELHI

Course Name: CERTIFICATE IN TALLY PRIME WITH GST Date: 31/07/2023 @ 06:00: pm
Student Name: Divya Laxman Sonawane PRN NO: 94364778
Institute Name: JIJAU COMPUTERS AND KNOWLEDGE INSTITUTE Institute Code: ITT50285
Exam Duration: 60 Minutes Total Questions: 30 Total Marks: 60
Passing Marks: 40 Marks/Question: 2 Type of Questions: Multiple Choice

1. Which of the following is the correct syntax to add the header


file in the C++ program?
1. #include "userdefined.h"
2. #include<userdefined>
3. <include> "userdefined.h"
4. Both A & B

2. Which of the following statements is correct about the friend


function in C++ programming language?
1. A friend function can access the private members of a class
2. A friend function is able to access private members of a class
3. A friend function is able to access the public members of a class
4. All of the above

3. Which of the following statements is correct about the class?


1. A class is an instance of its object
2. An object is the instance of the data type of that class
3. An object is an instance of its class
4. All of above

4. Which of the following can be used to create an abstract class in


the C++ programming language?
1. By using the pure virtual function in the class
2. By declaring a virtual function in the base class
3. By declaring the virtual keyword afterward, the class Declaration
4. None of the above

5. Which of the following can be considered as the members that can be


inherited but not accessible in any class?
1. Protected
2. Public
3. Private
4. None of the above

6. Which of the following is the correct syntax to print the message in C++
language?
1. Out <<"Hello world!;
2. cout <<"Hello world!";
3. Cout << Hello world! ;
4. None of the above

1
7. Which of the following can be considered as the correct syntax for
declaring an array of pointers of integers that has a size of 10 in
C++?
1. int *arr = new int*[10]
2. int *arr = new int[10];
3. int arr = new int[10];
4. int **arr = new int*[10];

8. Which one of the following statements correctly refers to the Delete


and Delete [] in C++ programming language?
1. The "Delete" is used for deleting the standard objects, while on the other
hand, the "Delete[]" is used to delete the pointer objects
2. The "Delete" is a type of keyword, whereas the "Delete[]" is a type of
identifier
3. The "Delete" is used for deleting a single standard object, whereas the
"Delete[]" is used for deleting an array of the multiple objects
4. Delete is syntactically correct although, if the Delete[] is used, it will
obtain an error

9. Which of the following statement is correct about Virtual Inheritance?


1. It is a technique to ensure that a private member of a base class can be
accessed
2. It is a C++ technique to avoid multiple copies of the base class into
the derived or child classes
3. It is a technique to optimize the multiple inheritances
4. It is a technique to avoid the multiple inheritances of the classes

10. How many types of elements can an array store?


1. Same types of elements
2. Only char types
3. Char and int type
4. All of the above

11. Which of the following can be considered as the object of an array?


1. Elements of the Array
2. Index of an array
3. Functions of the Array
4. All of the above

12. Which types of arrays are always considered as linear arrays?


1. Multi-dimensional
2. Single-dimensional
3. All of above
4. None of the above

2
13. What did we call an array of the one-dimensional array?
1. Multi-Dimensional array
2. Single Dimensional array
3. 2D Array (or 2-Dimensional array)
4. All of above
14. Which of the following gives the 4th element of the array?
1. Array[0];
2. Array[0];
3. Array[3];
4. None of the above

15. Which of the following is the correct identifier?


1. varname@
2. $var_name
3. VAR_123
4. None of the above

16. Which of the following is the correct syntax for declaring the array?
1. int array [5];
2. init array []
3. Array[5];
4. None of the above
5.
17. If we stored five elements or data items in an array, what will be the
index address or the index number of the array's last data item?
1. 88
2. 5
3. 4
4. 3

18. Which of the following is the original creator of the C++ language?
1. Dennis Ritchie
2. Ken Thompson
3. Bjarne Stroustrup
4. Brian Kernighan

19. Which of the following features must be supported by any


programming language to become a pure object-oriented programming
language?
1. Inheritance
2. Encapsulation
3. Polymorphism
4. All of the above
5.

3
20. Which one of the following represents the tab?
1. \t
2. \n
3. \r
4. None of the above

21. Which of the following language is predecessor to C Programming


Language?
1. A
2. B
3. BCPL
4. C++

22. C programming language was developed by


1. Dennis Ritchie
2. Ken Thompson
3. Bill Gates
4. Peter Norton
23. C language is available for which of the following Operating
Systems?
1. DOS
2. Windows
3. Unix
4. All of these
24. Which of the following is a ternary operator?
1. ?:
2. *
3. sizeof
4. ^

25. The operator + in a+=4 means


1. a=a+4
2. a+4=a
3. a=4
4. a=4+4

26 Null character is represented by


1. \n
2. \0
3. \o
4. \e

4
27. Which header file is essential for using strcmp() function?
1. string.h
2. strings.h
3. text.h
4. strcmp.h

28. C supports how many basic looping constructs


1. 2
2. 3
3. 4
4. 6

29. In the C language 'a’ represents


1. a digit
2. an integer
3. a character
4. a word

30. Which function is necessary to exist in each & every program?


1. void
2. sum
3. main
4. None of these

You might also like