You are on page 1of 1

Work sheet of Computer Programming

Part I: discuss the ff.quesitions.


Q1. Briefly discuss the three basic types of control structures.
Q2. Discuss all decision making statements with their flowcharts and syntax.
Q3. Discuss all Iteration or Lopping with their syntax and flowchart.
Q4. The difference b/n While and Do…While.
Q5. Briefly discuss Array and String with all examples in the class and handout.
Q6. Discuss the types of function with syntax and examples.
Q7. Discuss function prototype and function call with examples.
Q8. Discuss function definition and passing argument of function with different examples.
Q9. Pass by value Vs passing by reference with examples.

Part II: write a C++ program for the following questions.


Q1. Either the number is even or odd using all decision making statements.
Q2. That specifies local and global variables.
Q3.

Q4. That display some examples with 2D array and Matrix.


Q5. Library function that calculate square root of the function.
Q6. That represent function swap () pass by value and reference.
Part III: Some of the following pieces of code compile correctly but give unexpected
results. Describe the behavior of the problems, if any, and fix them.

You might also like