Skip to main content
CSSMPT.PK  Syllabus, Past Papers, MCQs & Complete Preparation Guide
  • Home
  • Science
    • Biology
    • Chemistry
    • Physics
  • English
  • Current
  • GK
  • Computer
  • Economics
  • PAST PAPERS
    • CSS MPT
    • CSS
  • Updates
    • FPSC
      • MPT
    • PPSC
      • PPSC JOBS
    • Blog / Articles

Author: Ahmed Raza

Consider the main body of a C++ program. If the program is run, what will be the output?

August 16, 2025August 16, 2025 Ahmed Raza

string a = “4”;
string b = “8”;
string c = a + b;
cout << c << endl;
If the program is run, what will be displayed on the screen?
(A) 4
(B) 8
(C) 12
(D) 48

The answer is: (D) 48

In C++, a function name must be followed by

August 16, 2025August 16, 2025 Ahmed Raza

(A) braces
(B) parentheses
(C) statement
(D) variable name

The answer is: (B) parentheses

An address is a _____, while a pointer is a _____.

August 16, 2025August 16, 2025 Ahmed Raza

(A) constant, variable
(B) variable, constant
(C) constant, constant
(D) variable, variable

The answer is: (A) constant, variable

What is the statement that displays the address of the variable myvar?

August 16, 2025August 16, 2025 Ahmed Raza

(A) myvar;
(B) &myvar;
(C) cout << myvar;
(D) cout << &myvar;

The answer is: (D) cout << &myvar;

Bundling data and functions together is known as

August 16, 2025August 16, 2025 Ahmed Raza

(A) debugging
(B) encapsulation
(C) overloading
(D) polymorphism

The answer is: (B) encapsulation

The goto statement causes control to go to a/an

August 16, 2025August 16, 2025 Ahmed Raza

(A) function
(B) operator
(C) variable
(D) label

The answer is: (D) label

The internet protocol suite is a framework for communication protocols that is divided in

August 16, 2025August 16, 2025 Ahmed Raza

(A) four layers
(B) five layers
(C) six layers
(D) seven layers

The answer is: (A) four layers

In C++, a pointer is

August 16, 2025August 16, 2025 Ahmed Raza

(A) address of a variable
(B) variable for storing addresses
(C) data type of an address variable
(D) constant value

The answer is: (B) variable for storing addresses

In which loop, the loop body executes at least once?

August 16, 2025August 16, 2025 Ahmed Raza

(A) for loop
(B) while loop
(C) do-while loop
(D) none of these

The answer is: (C) do-while loop

In a program where user inputs the roll number and the program displays the marks obtained, which of the following is suitable?

August 16, 2025August 16, 2025 Ahmed Raza

(A) for loop
(B) do-while loop
(C) if/ else statement
(D) switch statement

The answer is: (D) switch statement

Posts pagination

Newer posts 1 … 84 85 86 … 92 Older posts

GENERAL MCQS

  • General Knowledge
  • Current Affairs
  • Everyday Science
  • English MCQs
  • English Grammar MCQs
  • Islamic Studies
  • Pak Study MCQs
  • Analytical Reasoning
  • Arithmetic/ Basic Math

SCIENCE MCQS

  • Biology
  • Chemistry
  • Physics
  • Computer Science
  • Mathematics
  • Full List

EDUCATION

  • Education and Pedagogy
  • Bloom’s Taxonomy MCQs
  • Testing and Evaluation
  • Classroom Management & Discipline
  • Teaching Techniques & Methodology

BUSINESS MCQS

  • Commerce
  • Accounting
  • Economics
  • Banking
  • Project Management
  • Business Administration
  • Full List

SOCIAL SCIENCE

  • Geography
  • Sociology
  • History
  • International Relations
  • English Literature
  • Full List

REGIONAL MCQS

  • Canada
  • India
  • Pakistan
  • USA-United States
  • UK-United Kingdom
  • Home
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Disclaimer
Copyright 2025 Powered By PG Media