0% found this document useful (0 votes)
115 views8 pages

Introduction To Programming: 3. A. 4. A. 5. A. 6. A. 7. A. 8. A. 9

The document provides information on introduction to programming concepts like algorithms, flowcharts, and pseudocode. It discusses key flowchart symbols like rectangles, diamonds, circles, and parallelograms which are used to represent processes, decisions, I/O operations, and other elements. The document also contains multiple choice questions to test understanding of these concepts.

Uploaded by

ABELEX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views8 pages

Introduction To Programming: 3. A. 4. A. 5. A. 6. A. 7. A. 8. A. 9

The document provides information on introduction to programming concepts like algorithms, flowcharts, and pseudocode. It discusses key flowchart symbols like rectangles, diamonds, circles, and parallelograms which are used to represent processes, decisions, I/O operations, and other elements. The document also contains multiple choice questions to test understanding of these concepts.

Uploaded by

ABELEX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Introduction to Programming

1. _______ is a procedure or step by step process for solving a problem.


A. Algorithm B. Flowchart C. Pseudocode D. All
2. The _______ provides pictorial representation of given problem.
A. Algorithm B. Flowchart C. Pseudocode D. All
3. The ___________________ symbol is used at the beginning of a flow chart.
A. Circle B. Rectangle C. C. Diamond D. None
4. The _______ symbol is used to represent decision in flowchart.
A. Circle B. Rectangle C. Diamond D. None
5. The _______ symbol is used to represent process in flowchart.
A. Circle B. Rectangle C. Diamond D. None
6. _______________ Symbol is used to represent input and output operation in flowchart.
A. Circle B. Rectangle C. Diamond D. Parallelogram
7. ______ is a symbol used connects two symbols of flowchart.
A. Circle B. Rectangle C. Diamond D. Arrow
8. In computer science, algorithm refers to a pictorial representation of a flowchart.
A. True B. False

9. The following box denotes?

A. Decision B. Initiation C. Initialization D. I/O


10. A box that can represent two different conditions.
A. Rectangle B. Diamond C. Circle D. Parallelogram
11. Which of the following is not an advantage of a flowchart?
A. Better communication C. Systematic testing B. Efficient coding
D. Improper documentation
12. What is an Algorithm?
A. A flowchart C. A decision
B. Step by step instructions used to solve a problem D. A Pseudocode
13. What is the difference between a flowchart and pseudocode?
A. A flowchart is diagrammatic whilst pseudocode is written in a programming language
B. A flowchart is textual but pseudocode is diagrammatic
C. A flowchart is a diagrammatic description of an algorithm whilst pseudocode is a textual
description of an algorithm
D. A flowchart and pseudocode are the same thing
14. In a flowchart a calculation (process) is represented by
A. A rectangle B. A rhombus C. A parallelogram D. A circle
15. When you write an algorithm the order of the instructions is very important.
A. True
B. False
16. What should be considered when designing an algorithm?
A. If the correct hardware is being used C. If the correct software is being used
B. If there is more than one way of solving the problem D. None
17. In a flowchart how are symbols connected?
A. Symbols do not get connected together in a flowchart
B. With lines and an arrow to show the direction of flow
C. With dashed lines and numbers
D. With solid lines to link events
18. When can algorithms be used?
A. Only with computers C. Only when programming
B. Only with flowcharts D. Any time to design solutions to problems
19. A flowchart
A. Helps you plan out computer code C. Uses shapes to help organize a process
B. is a type of graphic diagram that represents an D. All
algorithm,

20. What does this shape represent?

A. Input/output B. Decision C. Process C. Start/Stop

21. What is this symbol?


A. Decision B. Input/output C. Start/End D. Process
22. What is pseudocode?
A. Simplified programming language, that is not a specific language
B. Complicated programming language
C. Simple programming language, which is linked to a specific language
D. A type of cheese
23. The operation represented by parallelograms.
A. Input/output B. Assignment C. Comparison D. Conditions
24. Which of the following is not a flowchart structure?
A. Process B. Sequence C. Repetition D. Case

Fundamentals of C++ programming Languages

1. Who invented C++?


A. Dennis Ritchie C. Ken Thompson B. Brian Kernighan
D.Bjarne Stroustrup

2. What is C++?
A. C++ is an object oriented programming language
B. C++ is a procedural programming language
C. C++ supports both procedural and object oriented programming language
D. C++ is a functional programming language

3. Which of the following is used for comments in C++?


A. /* comment */ C. // comment */
B. // comment D. both // comment or /* comment */

4. Which of the following is a correct identifier in C++?


A. VAR_1234 C. $var_name
B. 7VARNAME D. 7var_name
5. Which of the following type is provided by C++ but not C?
A. double B. float C. int D. bool

6. By default, all the files in C++ are opened in _________ mode.


A. Binary B. VTC C. Text D. ISCII
7. What will be the output of the following C++ code?
#include<iostream>
;

using namespace std


int main () { int
cin; cin >> cin;
" << cin;
cout << "cin:
return 0;
}
A. Segmentation fault C. Nothing is printed
B. Error D. cin: garbage value

8. What will be the output of the following C++ code?


#include <iostream>
;
using namespace std
int main() { char c =
74; cout << c; return
0;
}

A. I B. J C. A D. N

9. Which keyword is used to define the macros in C++?


A. #macro B. #define C. macro D. define

10. Which of the following symbol is used to declare the pre-processor directives in C++?
A. $ B. ^ C. # D. *

11. Which of the following is the correct syntax to print the message in C++ language?
A. cout <<"Hello world!"; C. cout << Hello world! ;

B. out <<"Hello world!; D. None of the above

12. Which of the following statements is correct about the formal parameters in C++?
A. Parameters with which functions are called
B. Parameters which are used in the definition of the function
C. Variables other than passed parameters in a function
D. Variables that are never used in the function

13. For inserting a new line in C++ program, which statement can be used?
A. \n B. \r C. \a D. None

Control statement
1. A flowchart needs to represent the a situation where for each mark a student is award 'Pass' or
'Fail'...the system will consider the mark and if it's 50 or over award 'Pass', else it awards 'Fail'. This
is an example of which of the algorithm constructs?
A. Decision B. Loop C. Sequence D. All
2. The action performed by a ___________ structure must eventually cause the loop to terminate.
A. Sequence B. case C. repetition D. process
3. How many loops are there in C++ 98?
A. 1 B. 2 C. 3 D. 4
4. Which of the following can replace a simple if-else construct?
A. while loop D. do-while loop
B. for loop E. Ternary operator
5. Each pass through a loop is called a/an
A. Enumeration B. iteration C. culmination D. pass through
6. What is true about the loop structure…?
A. Condition B. loop control variable C. body of the loop D. all
7. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?
A. 0 B. 1 C. 9 D. 10
8. Decision Control statements in C++ can be implemented using
A. If B. if-else C. Conditional Operator D. All
9. What is correct syntax of for loop?
A. for(initialization; condition; increment/decrement)
B. for(increment/decrement; initialization; condition)
C. C. for(initialization, condition, increment/decrement
D. D. None of these
10. Which of the following is an entry-controlled loop?
A. do-while loop B. while loop C. for loop D. Both (B) and (C)

C++ FUNCTIONS
2. Which is more effective while calling the C++ functions?
A. call by object C. call by pointer
B. call by value D. call by reference

3. Which of the following is used to terminate the function declaration in C++?


A.; B.] C.) D.:

4. Pick the incorrect statement about inline functions in C++?


A. Saves overhead of a return call from a function
B. They are generally very large and complicated function
C. These functions are inserted/substituted at the point of call
D. They reduce function call overheads
5. Which of the following is the default return value of functions in C++?
A. int B. char C. float D. void
6. What is an inline function?
A. A function that is expanded at each call during execution
B. A function that is called during compile time
C. A function that is not checked for syntax errors
D. A function that is not checked for semantic analysis
7. An inline function is expanded during ______________
A. compile-time C. run-time
B. Never expanded D. end of the program
8. When we define the default values for a function?
A. When a function is defined C. When a function is declared
B. When the scope of the function is over D. When a function is called

9. What will be the output of the following C++ code?


#include <iostream>
;
using namespace std );
int fun(int=0, int = 0
int main() { cout <<
fun(5); return 0;
}

int fun(int x, int y) { return (x + y); }


A. -5 B. 0 C. 10 D. 5

10. Which of the following is important in a function?


A. Return type
B. Function name
C. Both return type and function name

D. The return type, function name and parameter list

11.  Which type of memory is used by an Array in C++ programming language?

a. Contiguous
b. None-contiguous
c. Both A and B
d. Not mentioned

FROM THE WEB


1. https://www.sanfoundry.com/cplusplus-interview-questions-answers/
2. https://meritnotes.com/computer-quiz/cpp-basics/1-6872/ => best site

You might also like