TRE4 C and C++ Quiz practice set 3 25th October 2026 Share On Que: (1). Which language is better for writing structured code? PASCAL A. BASIC C. FORTRAN B. More than one of the above D. None of the above E. Check Answer Open question page Que: (2). Which of the following is primarily a procedural programming language that supports structured programming? HTML B. CSS C. C A. More than one of the above D. None of the above E. Check Answer Open question page Que: (3). What is the full form of FORTRAN? Formula Translation A. Formal Translator C. Format Translation B. More than one of the above D. None of the above E. Check Answer Open question page Que: (4). Which programming language was specifically designed for business data processing? Prolog C. LOGO B. COBOL A. More than one of the above D. None of the above E. Check Answer Open question page Que: (5). What is the full form of BASIC? Beginner's All-purpose Symbolic Instruction Code A. Basic Automatic System Instruction Code B. Binary All-purpose System Instruction Code C. More than one of the above D. None of the above E. Check Answer Open question page Que: (6). Which of the following is a first-generation programming language? High-level language C. Machine language A. Assembly language B. More than one of the above D. None of the above E. Check Answer Open question page Que: (7). Which type of language uses mnemonic instructions such as MOV, ADD and SUB? Machine language B. SQL C. Assembly language A. More than one of the above D. None of the above E. Check Answer Open question page Que: (8). Which translator typically translates an entire source program into machine code or another target form before execution? Debugger C. Compiler A. Interpreter B. More than one of the above D. None of the above E. Check Answer Open question page Que: (9). Which language-processing approach generally executes program instructions through interpretation rather than requiring a separate compiled executable? Assembly B. Interpretation A. Linking C. More than one of the above D. None of the above E. Check Answer Open question page Que: (10). Which of the following is an object-oriented programming language? CSS C. HTML B. C++ A. More than one of the above D. None of the above E. Check Answer Open question page Que: (11). Which language does a browser use to display information from the World Wide Web? C++ C. Machine code A. Assembly language B. More than one of the above D. None of the above E. Check Answer Open question page Que: (12). What is the full form of HTML? HighText Machine Language B. HyperText Markup Language A. Hyper Transfer Markup Link C. More than one of the above D. None of the above E. Check Answer Open question page Que: (13). Which language is primarily used to style the appearance of web pages? HTML A. SQL C. CSS B. More than one of the above D. None of the above E. Check Answer Open question page Que: (14). Which programming language is commonly used to add interactivity to web pages in a browser? HTML B. JavaScript A. CSS C. More than one of the above D. None of the above E. Check Answer Open question page Que: (15). What is the full form of URL? Universal Record Link B. Uniform Reference Language C. Uniform Resource Locator A. More than one of the above D. None of the above E. Check Answer Open question page Que: (16). What is the full form of HTTP? HyperText Transfer Protocol A. Hyper Transfer Terminal Process C. High Transfer Text Program B. More than one of the above D. None of the above E. Check Answer Open question page Que: (17). Which of the following is a web browser? MySQL B. Google Chrome A. PHP C. More than one of the above D. None of the above E. Check Answer Open question page Que: (18). What is the primary function of a web server? To compile every HTML page into C++ C. To design computer processors B. To store and serve web resources to clients A. More than one of the above D. None of the above E. Check Answer Open question page Que: (19). In web communication, which component typically sends an HTTP request to a web server? Web browser A. Compiler C. Keyboard B. More than one of the above D. None of the above E. Check Answer Open question page Que: (20). Which HTML element is used to create a hyperlink? <p> B. <h1> C. <a> A. More than one of the above D. None of the above E. Check Answer Open question page Que: (21). Select the true statement for compiler. It translates the source code into object code as a whole. B. The input of the compiler is source program. A. The output of the compiler is object code. C. More than one of the above D. None of the above E. Check Answer Open question page Que: (22). What is the primary function of a compiler? To translate a source program into a target representation B. To execute source code one statement at a time only A. To manage database records C. More than one of the above D. None of the above E. Check Answer Open question page Que: (23). Which translator converts assembly language into machine code? Interpreter B. Compiler A. Assembler C. More than one of the above D. None of the above E. Check Answer Open question page Que: (24). Which statement best describes an interpreter? It always translates the entire program into a standalone executable before execution. A. It is used only to link object files. C. It converts assembly language into machine code. B. More than one of the above D. It executes program instructions through an interpretation process. E. Check Answer Open question page Que: (25). What is the primary function of a linker? To execute every source statement directly C. To combine object files and resolve external references A. To translate high-level code into assembly only B. More than one of the above D. None of the above E. Check Answer Open question page Que: (26). Which system program loads an executable into memory for execution? Assembler C. Compiler A. Loader B. Preprocessor D. None of the above E. Check Answer Open question page Que: (27). What is source code? The physical components of a computer A. A program after it has been printed B. The original program instructions written in a programming language C. More than one of the above D. None of the above E. Check Answer Open question page Que: (28). Which statement about object code is correct? It is the same as source code in every respect. B. It is used only to design web pages. C. It is always written in HTML. A. More than one of the above D. It is a translated representation produced during compilation or assembly. E. Check Answer Open question page Que: (29). Which type of error is commonly detected during compilation? Incorrect user requirement C. Incorrect business decision B. Syntax error A. More than one of the above D. None of the above E. Check Answer Open question page Que: (30). Which of the following are commonly associated with the compilation process? Code generation C. Lexical analysis A. Syntax analysis B. More than one of the above D. None of the above E. Check Answer Open question page Que: (31). Which of the following is not a valid variable name in most programming languages? myVariable A. _myVariable C. 123Variable B. More than one of the above D. None of the above E. Check Answer Open question page Que: (32). What is an identifier in programming? A special symbol used only for addition B. A type of computer hardware C. A name given to a variable, function or other program entity A. More than one of the above D. None of the above E. Check Answer Open question page Que: (33). Which of the following is a valid variable name in C? total_marks C. float B. 2value A. More than one of the above D. None of the above E. Check Answer Open question page Que: (34). Which of the following is a reserved keyword in C? total_marks C. return B. student A. More than one of the above D. None of the above E. Check Answer Open question page Que: (35). Are variable names case-sensitive in C? No, total and Total are always identical B. Only when variables store integers C. Yes, total and Total are different identifiers A. More than one of the above D. None of the above E. Check Answer Open question page Que: (36). Which character can be used at the beginning of a variable name in C? A digit A. A hyphen B. An underscore C. More than one of the above D. None of the above E. Check Answer Open question page Que: (37). Which of the following is not a valid variable name in C? student name C. student_name A. studentName B. More than one of the above D. None of the above E. Check Answer Open question page Que: (38). Which keyword is commonly used to declare a read-only variable in C++? const B. extern C. static A. More than one of the above D. None of the above E. Check Answer Open question page Que: (39). Which of the following is a valid variable name in Python? my-value A. class B. _my_value C. More than one of the above D. None of the above E. Check Answer Open question page Que: (40). Which statement about identifiers in C is correct? An identifier can begin with a digit A. An identifier can contain spaces B. A reserved keyword can be used as an ordinary variable name C. More than one of the above D. None of the above E. Check Answer Open question page Que: (41). If a semicolon is not used at the end of a statement, what message will be displayed by C++? Error in statements C. Semicolon missing A. Statement missing B. More than one of the above D. None of the above E. Check Answer Open question page Que: (42). What is the primary purpose of a semicolon in C++? To terminate many statements A. To start a class declaration B. To declare a header file C. More than one of the above D. None of the above E. Check Answer Open question page Que: (43). What is the likely result of compiling the following C++ code: int x = 10 cout << x; The program always prints 10 A. A compilation error is likely B. The compiler automatically inserts every missing semicolon C. More than one of the above D. None of the above E. Check Answer Open question page Que: (44). What does a single semicolon represent in C++? A function definition B. An empty statement C. A class declaration A. More than one of the above D. None of the above E. Check Answer Open question page Que: (45). Which symbol normally terminates a simple statement in C++? Full stop C. Comma A. Colon B. More than one of the above D. None of the above E. Check Answer Open question page Que: (46). Which is the correct declaration of an integer variable in C++? int = number 10; B. int number = 10; A. number int = 10 C. More than one of the above D. None of the above E. Check Answer Open question page Que: (47). Which software detects and reports many syntax errors in C++ source code? Text editor alone C. Web browser A. Compiler B. More than one of the above D. None of the above E. Check Answer Open question page Que: (48). Which symbols are used to enclose a block of statements in C++? Curly braces {} C. Square brackets [] B. Parentheses () A. More than one of the above D. None of the above E. Check Answer Open question page Que: (49). Which is the correct syntax for a basic if statement in C++? if x > 0 { } A. if (x > 0); { } C. if (x > 0) { } B. More than one of the above D. None of the above E. Check Answer Open question page Que: (50). Which of the following can cause a syntax error in C++? Misspelled language keyword C. Missing required semicolon A. Incorrect placement of a bracket B. More than one of the above D. None of the above E. Check Answer Open question page Que: (51). Which shortcut keys are used to compile and run a program in Turbo C++? Alt+F9 A. Alt+F5 B. Ctrl+F9 C. More than one of the above D. None of the above E. Check Answer Open question page Que: (52). Which shortcut key is used to compile a program in classic Turbo C++? Alt+F5 C. Ctrl+F9 B. Alt+F9 A. More than one of the above D. None of the above E. Check Answer Open question page Que: (53). Which shortcut key is used to run a program in classic Turbo C++? Alt+F5 C. Alt+F9 A. Ctrl+F9 B. More than one of the above D. None of the above E. Check Answer Open question page Que: (54). Which shortcut key displays the user screen in classic Turbo C++? Ctrl+F9 A. Alt+F9 B. Alt+F5 C. More than one of the above D. None of the above E. Check Answer Open question page Que: (55). What is the primary function of a C++ compiler? To translate source code into a target representation A. To manage internet connections only C. To design computer hardware B. More than one of the above D. None of the above E. Check Answer Open question page Que: (56). What happens when a C++ program contains a syntax error? The compiler automatically corrects every error C. The program always runs successfully A. The compiler reports an error and compilation generally fails B. More than one of the above D. None of the above E. Check Answer Open question page Que: (57). What is the main purpose of debugging a C++ program? To identify and correct program defects C. To increase the size of the source file A. To convert source code into HTML B. More than one of the above D. None of the above E. Check Answer Open question page Que: (58). What is the full form of IDE in software development? Internal Data Execution B. Internet Development Engine C. Integrated Development Environment A. More than one of the above D. None of the above E. Check Answer Open question page Que: (59). Which of the following is commonly part of building a C++ program? Compilation A. Linking B. Both compilation and linking C. More than one of the above D. None of the above E. Check Answer Open question page Que: (60). In classic Turbo C++, which shortcut is used to view the output screen after running a program? Alt+F9 B. Ctrl+F9 C. Alt+F5 A. More than one of the above D. None of the above E. Check Answer Open question page Que: (61). Which of the following is a user-defined header file extension used in C++? .hg A. .cpp B. .h C. More than one of the above D. None of the above E. Check Answer Open question page Que: (62). What is the primary purpose of a header file in C++? To execute the program B. To store only program output C. To provide declarations and function prototypes A. More than one of the above D. None of the above E. Check Answer Open question page Que: (63). Which preprocessor directive is used to include a header file in C++? #ifdef C. #include A. #define B. More than one of the above D. None of the above E. Check Answer Open question page Que: (64). Which standard C++ header file is commonly used for input and output with cin and cout? <string.h> B. <iostream> C. <stdio.h> A. More than one of the above D. None of the above E. Check Answer Open question page Que: (65). Which syntax is commonly used to include a user-defined header file named myheader.h? include("myheader.h") C. #include <myheader.h> B. #include "myheader.h" A. More than one of the above D. None of the above E. Check Answer Open question page Que: (66). Which file extension is commonly used for a C++ source file? .html C. .h A. .cpp B. More than one of the above D. None of the above E. Check Answer Open question page Que: (67). What is the main purpose of a header guard in C++? To prevent a header file from being included multiple times in one translation unit A. To execute the main function automatically C. To increase the size of the executable B. More than one of the above D. None of the above E. Check Answer Open question page Que: (68). Which of the following is a valid C++ preprocessor directive for defining a macro? #return C. #define B. #include A. More than one of the above D. None of the above E. Check Answer Open question page Que: (69). Which of the following is a common declaration found in a C++ header file? A constant declaration C. A function prototype A. A class declaration B. More than one of the above D. None of the above E. Check Answer Open question page Que: (70). Which statement about C++ header files is correct? Header files must always use the .cpp extension B. Header files are used only to display output C. A header file can be included using the #include directive A. More than one of the above D. None of the above E. Check Answer Open question page