This document contains a unit test with multiple choice and short answer questions about programming concepts like program structure, loops, arrays, and functions. It asks the student to define terms like algorithms and modular programming. It also contains short programs to check if a number is even/odd, initialize variables in a for loop, and search if a number belongs to an array. The longest questions ask the student to write programs to take input from the user, display a series, and search an array.
This document contains a unit test with multiple choice and short answer questions about programming concepts like program structure, loops, arrays, and functions. It asks the student to define terms like algorithms and modular programming. It also contains short programs to check if a number is even/odd, initialize variables in a for loop, and search if a number belongs to an array. The longest questions ask the student to write programs to take input from the user, display a series, and search an array.
This document contains a unit test with multiple choice and short answer questions about programming concepts like program structure, loops, arrays, and functions. It asks the student to define terms like algorithms and modular programming. It also contains short programs to check if a number is even/odd, initialize variables in a for loop, and search if a number belongs to an array. The longest questions ask the student to write programs to take input from the user, display a series, and search an array.
Q 1. What is program structure? Q 2. What is the need for programming methodology? Q 3. How many times is the loop body executed in a do-while loop? Q 4. Which C++ loops are entry-controlled loop? Mark True or False Q 5. All the elements in an array need not be of the same type. Q 6. An array element is accessed using an index number. Q 7. In a while loop, the body of the loop is repeated as long as condition remains false. Q 8. A program which is effective and efficient is known as a useful program. B. Two marks questions Q 1. What is a good program? Write the characteristics of a good program. Q 2. What are the advantages and disadvantages of the modular programming? Q 3. What are run-time errors? How are they removed? Q 4. What is an algorithm? What are the characteristics of an algorithm? Q 5. What is the difference between a while and do-while loop? Q 6. What is an array? How to declare and initialize an array? Q 7. Write a program to check whether the given number is even or odd. Q 8. How does the continue statement differ from the break statement? Q 9. How can variables be initialized within a for loop? Explain with an example. Q 10. What will be the output of following programs? #include<iostream.h> void main( ) { int p=1; do { cout<<p; }while(p--); } C. Four marks questions Q 1. Write a program to take 10 inputs from user and display it. Q 2. Write a program to check whether the number input by the user belongs to an array or not. Q 3. Write a program to print the following series: 1 5 9 13 ………… 49