Home / Exit exam / Past papers / Model Exit Exam 2017 E.C. - Round 3 (CSE)
Model Exit Exam 2017 E.C. - Round 3 (CSE): questions and answers
Model exam for Computer Science & Engineering, Computer Science, 2017 E.C. (2025 G.C.). 100 questions, 120 minutes. A model exam written to match the format and difficulty of the real paper, with explanations.
The first 5 questions
Open "Show answer" under a question to see the correct option and the explanation. The full paper, with the clock, scoring and a review of every question, is in the app.
1. Which of the following will correctly declare a constant symbolic value for PI in C++?
- #define PI = 3.14
- const float PI = 3.14;
- constant PI = 3.14;
- final float PI = 3.14;
Show answer
Answer: B. const float PI = 3.14;
2. What will be the output of the following code? int arr[] = {10, 20, 30, 40, 50}; int *ptr = arr + 2; cout << *ptr << " " << *(ptr + 1);
- 20 30
- 10 20
- 30 40
- 40 50
Show answer
Answer: C. 30 40
3. Which of the following correctly dynamically allocates memory for an array of 10 integers in C++?
- int arr[10] = new int;
- int *arr = new int[10];
- int *arr = malloc(10 * sizeof(int));
- int arr = new int[10];
Show answer
Answer: B. int *arr = new int[10];
4. What is the main difference between passing an array to a function by value vs. by pointer?
- Arrays can only be passed by pointer, not by value
- Passing by value creates a copy; passing by pointer does not
- There is no difference in C++
- Passing by pointer is slower than passing by value
Show answer
Answer: A. Arrays can only be passed by pointer, not by value
5. Which mode should be used to open a file for both reading and writing in C++?
- ios::in
- ios::out
- ios::in | ios::out
- ios::app
Show answer
Answer: C. ios::in | ios::out
Take the full Computer Science paper
Start free with the oldest paper of your department, then unlock this one with Premium.
Start studying free Log in