0% found this document useful (0 votes)
1 views6 pages

Question Bank For ISE2025SemII

The document is a question bank for the subject 'Programming for Problem Solving' with a paper pattern of 10 questions worth 10 marks each, to be completed in 20 minutes. It includes multiple-choice questions covering topics such as loops, arrays, and control statements in C programming. Each question presents a scenario or concept related to programming, along with four answer options.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views6 pages

Question Bank For ISE2025SemII

The document is a question bank for the subject 'Programming for Problem Solving' with a paper pattern of 10 questions worth 10 marks each, to be completed in 20 minutes. It includes multiple-choice questions covering topics such as loops, arrays, and control statements in C programming. Each question presents a scenario or concept related to programming, along with four answer options.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Question bank for ISE

Subject: Programming for Problem Solving


Paper Pattern: 10 questions: 10 Marks. (Time : 20 minutes )

1. Which of the following loops is guaranteed to execute at least once?


A) for loop
B) while loop
C) do-while loop
D) All of the above

2. What does the continue statement do in a loop?


A) Terminates the loop immediately
B) Skips the remaining statements in the loop body and starts the next iteration
C) Skips the loop entirely
D) Returns to the calling function

3. Which of the following is true about the goto statement?

A) It improves code readability


B) It can be used to jump to any label in the program, even in a different function
C) It is generally discouraged in structured programming
D) It is necessary for all loops in C

4. In a 1D array, the elements are stored in:


A) Random memory locations
B) Contiguous memory locations
C) Non-contiguous memory locations
D) User-defined memory addresses

5. What happens if the loop condition in a while loop is always true and there is no
break?
A) It runs once
B) It gives a compile-time error
C) It causes an infinite loop
D) It exits automatically after some time

6. Which of the following is a valid reason to use the break statement inside a loop?
A) To skip the next iteration
B) To immediately stop the entire loop execution
C) To jump to a different function
D) To reset loop variables
7) What will be the output of the following code?

main ( )

int i;
for (i = 0; i < 5; i++) {
if (i == 3)
break;
printf ("%d ", i);
}

A) 0 1 2 3
B) 0 1 2
C) 0 1 2 3 4
D) 1 2 3

8) Which of the following loop in C checks the condition after executing the loop
body?
A) for
B) while
C) do-while
D) All of above

9) What will be the output of the following code?

main( )

int i = 0;

while (i < 5)
{
if (i == 3)
continue;
printf ("%d ", i);
i++;
}
A)1 2 3 4 5
B) 1 2 4 5
C) 0 1 2 4 5
D) 1 2 3 5
9. Which keyword is used to transfer control out of a loop unconditionally?

A) continue
B) break
C) return
D) All of these

10) What is the index of the last element in a 1D array of size n?

A) n
B) n - 1
C) 0
D) 1

11. Which of the following is true for 1D arrays in C?

A) Array index starts from 1


B) All elements must be of different types
C) Array size can be changed after declaration
D) Array elements index starts from zero

12. What will be the output of this code?

main( )

int arr[5] = {5, 10, 15, 20, 25};

printf ("%d", arr[2]);

A) 10
B) 15
C) 20
D) 25

13. Which of the following can be used to initialize an array?

A) int a[3];
B) int a[3] = {1, 2, 3};
C) int a[ ];
D) int a = {1, 2, 3};
14. What is the correct way to declare a 1D array of 10 integers?

A) int arr[10];
B) int[10] arr;
C) arr int[10];
D) int arr = [10];

15. Choose the correct statement from the following.

A) continue exits the loop


B) break skips an iteration
C) continue skips the remaining code in current iteration
D) goto cannot be used in loops

16. Which of the following best describes the use of goto?

A) Used for structured programming


B) Used to implement recursion
C) Used to jump to a labeled part of the code
D) Used to exit a program

17. What will be the value of sum after execution?

main()

int arr[] = {1, 2, 3, 4, 5}, sum = 0, i ;

for ( i = 0; i < 5; i++)

sum =sum + arr[i];

A) 10
B) 15
C) 20
D) 5
18. What will be the output of the code below?

main()

int i = 0;

do {

printf("%d ", i);

i++;

} while (i < 3);

A) 0 1 2
B) 1 2 3
C) 0 1 2 3
D) Infinite loop

19. What will be the output of the code below?

main()

int i = 1;

do {

printf("%d ", i);

} while (i < 3);

A) 0 1 2
B) 1 2 3
C) 0 1 2 3
D) Infinite loop

20. In a 1D array x having 10 elements what element does x[9] indicates?

A) First B) Last C) Second Last D) None of these.

You might also like