Question 1 of 72Introduction to C Programming
Which loop in C is guaranteed to execute its body at least once?
Afor loop
Bwhile loop
Cdo-while loop
DAll loops guarantee at least one execution
Answer is hidden
Question 2 of 72Introduction to C Programming
In C, the printf format specifier to print a floating-point number is:
Answer is hidden
Question 3 of 72Introduction to C Programming
A recursive function without a base case will cause:
AA compilation error
BAn infinite loop producing correct output
CSlow but correct execution
DInfinite recursion leading to a stack overflow
Answer is hidden
Question 4 of 72Introduction to C Programming
In C, arrays are indexed starting from:
A1
B0
C-1
DDepends on declaration
Answer is hidden
Question 5 of 72Introduction to C Programming
The string "Hello" in C memory is stored as:
AH, e, l, l, o
BH, e, l, l, o, EOF
CH, e, l, l, o, \0
D5 bytes with no terminator
Answer is hidden
Question 6 of 72Introduction to C Programming
Which of the following is NOT a valid looping construct in C?
Arepeat-until
Bwhile
Cfor
Ddo-while
Answer is hidden
Question 7 of 72Introduction to C Programming
C passes function arguments by value, which means the function receives:
AA reference to the original variable
BThe original variable itself
CA pointer by default
DA copy of the argument
Answer is hidden
Question 8 of 72Introduction to C Programming
The switch statement in C works with which data types?
Afloat and double
Bint and char (integral types)
CAny data type
DOnly int
Answer is hidden
Question 9 of 72Introduction to C Programming
In a 2D array a[3][4], how many total elements are stored?
Answer is hidden
Question 10 of 72Introduction to C Programming
The C function strcpy() is used to:
ACompare two strings
BCopy one string into another
CCalculate string length
DConcatenate strings
Answer is hidden
Question 11 of 72Pointers, Structure and Data Files in C
Which operator in C retrieves the memory address of a variable?
A* (dereference)
B& (address-of)
C-> (arrow)
D. (dot)
Answer is hidden
Question 12 of 72Pointers, Structure and Data Files in C
How does a C structure differ from a union?
AStructures can only hold int; unions can hold any type
BStructures use -> for access; unions use .
CThey are identical in behavior
DEach struct member has own memory; union members share memory
Answer is hidden
Question 13 of 72Pointers, Structure and Data Files in C
Passing a pointer to a function in C allows the function to:
AModify the original variable in the caller
BReceive a copy of the pointer only
CAccess only global variables
DReturn multiple return values through keywords
Answer is hidden
Question 14 of 72Pointers, Structure and Data Files in C
The expression a[i] in C is equivalent to:
A*a[i]
B&(a + i)
C*(a + i)
Da + i
Answer is hidden
Question 15 of 72Pointers, Structure and Data Files in C
To open a file for reading in C, the fopen() mode string is:
Answer is hidden
Question 16 of 72Pointers, Structure and Data Files in C
The size of a union is determined by:
AThe size of its LARGEST member
BThe sum of all member sizes
CThe size of the first declared member
DAlways 8 bytes
Answer is hidden
Question 17 of 72Pointers, Structure and Data Files in C
Which C function is used to move to a specific position in a file for random access?
Afread()
Bfscanf()
Cfgets()
Dfseek()
Answer is hidden
Question 18 of 72Pointers, Structure and Data Files in C
To access a structure member through a pointer in C, you use:
A. (dot operator)
B* (dereference)
C-> (arrow operator)
D& (address-of)
Answer is hidden
Question 19 of 72Pointers, Structure and Data Files in C
If int *p and sizeof(int) is 4 bytes, then p+1 points to the address:
A4 bytes after p
B1 byte after p
CSame address as p
D2 bytes after p
Answer is hidden
Question 20 of 72Pointers, Structure and Data Files in C
Which declaration correctly defines a pointer to an integer in C?
Aint p;
Bint *p;
C*int p;
Dint& p;
Answer is hidden
Question 21 of 72OOP Fundamentals and Frameworks
Which OOP principle hides implementation details and exposes only the essential interface?
AInheritance
BPolymorphism
CEncapsulation
DAbstraction
Answer is hidden
Question 22 of 72OOP Fundamentals and Frameworks
A constructor in C++ is automatically called:
AOnly when explicitly invoked
BWhen the object is destroyed
CWhen an object is created
DOnly in derived classes
Answer is hidden
Question 23 of 72OOP Fundamentals and Frameworks
Which access specifier makes a member accessible from anywhere in the program?
Apublic
Bprivate
Cprotected
Dfriend
Answer is hidden
Question 24 of 72OOP Fundamentals and Frameworks
Inheritance in OOP represents which type of relationship?
AHAS-A relationship
BIS-A relationship
CUSES-A relationship
DPART-OF relationship
Answer is hidden
Question 25 of 72OOP Fundamentals and Frameworks
The this pointer in a C++ member function refers to:
AThe base class object
BThe static member
CThe object that invoked the member function
DThe most recently constructed object
Answer is hidden
Question 26 of 72OOP Fundamentals and Frameworks
A static data member in a C++ class is:
AShared across all objects of the class (one copy)
BPrivate to each individual object
CInitialized to zero only
DOnly accessible in the constructor
Answer is hidden
Question 27 of 72OOP Fundamentals and Frameworks
The destructor in C++ is called automatically when:
AAn object is created
BA constructor fails
CThe program starts
DAn object goes out of scope or is deleted
Answer is hidden
Question 28 of 72OOP Fundamentals and Frameworks
Polymorphism in OOP means:
AOne class inheriting from many base classes
BOne interface with multiple different implementations
CHiding data from external access
DCopying object state to another object
Answer is hidden
Question 29 of 72OOP Fundamentals and Frameworks
The JVM (Java Virtual Machine) is responsible for:
ACompiling Java source code to machine code directly
BStoring the Java development tools
CRunning Java bytecode on any platform
DManaging database connections
Answer is hidden
Question 30 of 72OOP Fundamentals and Frameworks
A friend function in C++ has which special privilege?
AIt becomes a member of the class
BIt can access the private and protected members of the class
CIt is inherited by all derived classes
DIt must be declared as static
Answer is hidden
Question 31 of 72Fundamentals of Web Technology
Which email protocol is used to SEND outgoing email?
Answer is hidden
Question 32 of 72Fundamentals of Web Technology
HTTPS provides security over HTTP by:
AUsing port 80 instead of 443
BRemoving cookies
CEncrypting data in transit using TLS
DBlocking all GET requests
Answer is hidden
Question 33 of 72Fundamentals of Web Technology
JavaScript code in a web application executes on the:
AWeb server
BClient's browser
CDatabase server
DDNS server
Answer is hidden
Question 34 of 72Fundamentals of Web Technology
AClient-side scripting language
BMarkup language
CCompiled machine-code language
DServer-side scripting language
Answer is hidden
Question 35 of 72Fundamentals of Web Technology
The DOM (Document Object Model) is used by JavaScript to:
AConnect to a MySQL database
BSend email via SMTP
CDynamically access and modify HTML elements
DManage PHP sessions
Answer is hidden
Question 36 of 72Fundamentals of Web Technology
IMAP is preferred over POP3 for email because IMAP:
AKeeps emails on the server, enabling multi-device sync
BDeletes emails after download for efficiency
CWorks without an internet connection
DSends emails faster
Answer is hidden
Question 37 of 72Fundamentals of Web Technology
Which HTTP method is used to submit form data to a web server?
Answer is hidden
Question 38 of 72Fundamentals of Web Technology
A PHP session stores user data on the:
AClient's browser cookie
BClient's local storage
CDNS server
DWeb server
Answer is hidden
Question 39 of 72Fundamentals of Web Technology
In web development, CRUD stands for:
ACreate, Run, Update, Deploy
BCode, Read, Use, Delete
CCreate, Read, Update, Delete
DCompile, Run, Upload, Debug
Answer is hidden
Question 40 of 72Fundamentals of Web Technology
A Content Management System (CMS) like WordPress is used to:
AConfigure DNS records
BManage and publish web content without manual coding
CCompile PHP to machine code
DMonitor network traffic
Answer is hidden
Question 41 of 72Pure Virtual Functions and File Handling in C++
A virtual function in C++ enables:
ACompile-time function overloading
BStatic memory allocation
CRuntime polymorphism (dynamic dispatch)
DFile stream operations
Answer is hidden
Question 42 of 72Pure Virtual Functions and File Handling in C++
An abstract class in C++ is one that:
AHas no data members
BContains at least one pure virtual function
CCannot have a constructor
DHas only static member functions
Answer is hidden
Question 43 of 72Pure Virtual Functions and File Handling in C++
A pure virtual function in C++ is declared as:
Avirtual void f() = 0;
Bvoid virtual f();
Cpure virtual void f();
Dabstract void f();
Answer is hidden
Question 44 of 72Pure Virtual Functions and File Handling in C++
To open a C++ file stream for APPENDING data, which mode flag is used?
Aios::in
Bios::out
Cios::trunc
Dios::app
Answer is hidden
Question 45 of 72Pure Virtual Functions and File Handling in C++
Which C++ stream class is used specifically to READ from a file?
Aofstream
Bifstream
Ciostream
Dostream
Answer is hidden
Question 46 of 72Pure Virtual Functions and File Handling in C++
Can an abstract class in C++ be directly instantiated?
AYes, always
BYes, if it has a public constructor
CNo ā it cannot be instantiated
DYes, using dynamic allocation only
Answer is hidden
Question 47 of 72Pure Virtual Functions and File Handling in C++
The <iomanip> manipulator setprecision(2) in C++ controls:
AThe number of decimal places shown in floating-point output
BThe minimum field width of output
CThe binary precision of a float
DThe text alignment (left or right)
Answer is hidden
Question 48 of 72Pure Virtual Functions and File Handling in C++
The vtable (virtual table) in C++ stores:
AVariable names and types
BClass hierarchy names
CStatic member values
DPointers to virtual function implementations
Answer is hidden
Question 49 of 72Pure Virtual Functions and File Handling in C++
In C++, to write a binary object directly to a file, you use:
Afprintf()
Bstream.write()
Cprintf()
Dstream <<
Answer is hidden
Question 50 of 72Pure Virtual Functions and File Handling in C++
In the C++ stream class hierarchy, which class is the ultimate base for all streams?
Aifstream
Bfstream
Cios
Dostream
Answer is hidden
Question 51 of 72Generic Programming and Exception Handling
The primary benefit of function templates in C++ is:
AAvoiding virtual functions
BWriting one function that works for multiple data types
CHandling runtime exceptions
DAccessing private class members
Answer is hidden
Question 52 of 72Generic Programming and Exception Handling
In C++ exception handling, the keyword used to signal an error is:
Answer is hidden
Question 53 of 72Generic Programming and Exception Handling
In the STL, iterators serve as the bridge between:
AClasses and objects
BConstructors and destructors
CInput and output streams
DContainers and algorithms
Answer is hidden
Question 54 of 72Generic Programming and Exception Handling
The catch(...) syntax in C++ catches:
AOnly integer exceptions
BOnly std::exception types
CAny type of exception
DOnly exceptions from the STL
Answer is hidden
Question 55 of 72Generic Programming and Exception Handling
A class template in C++ enables you to:
ACreate a single class that works with any data type
BOverride virtual functions
CHandle multiple exceptions
DAccess protected members
Answer is hidden
Question 56 of 72Generic Programming and Exception Handling
Inside a catch block, a bare throw; statement (no argument):
ARe-throws the currently caught exception
BTerminates the program immediately
CCreates a new default exception
DReturns to the try block
Answer is hidden
Question 57 of 72Generic Programming and Exception Handling
Which of the following is an STL container?
Asort()
Biterator
Cvector
Dfind()
Answer is hidden
Question 58 of 72Generic Programming and Exception Handling
When a thrown exception has no matching catch block anywhere in the call stack, C++ calls:
Aexit()
Babort()
Cunexpected()
Dterminate()
Answer is hidden
Question 59 of 72Generic Programming and Exception Handling
Multiple catch blocks after a single try block allow you to:
AHandle the same exception multiple times
BHandle different exception types with different logic
CPrevent exceptions from propagating
DCatch exceptions from all nested functions
Answer is hidden
Question 60 of 72Generic Programming and Exception Handling
The STL algorithm sort() belongs to which STL component?
AContainer
BIterator
CAlgorithm
DAdaptor
Answer is hidden
Question 61 of 72Computer Architecture & Hardware
When an interrupt occurs, the CPU transfers execution to:
AInterrupt Service Routine (ISR)
BMain program counter
CStack pointer
DAccumulator
Answer is hidden
Question 62 of 72Computer Architecture & Hardware
The 8086 microprocessor operates in which two modes?
AReal mode and Protected mode
BMinimum mode and Maximum mode
CUser mode and Kernel mode
DSingle-bus and Multi-bus mode
Answer is hidden
Question 63 of 72Computer Architecture & Hardware
Assembly language source code is translated to machine code by:
AAssembler
BCompiler
CInterpreter
DLinker
Answer is hidden
Question 64 of 72Computer Architecture & Hardware
The 8255 Programmable Peripheral Interface (PPI) provides which type of interface?
APhysical
BLogical
CSerial
DOptical
Answer is hidden
Question 65 of 72Computer Architecture & Hardware
RISC (Reduced Instruction Set Computer) architecture is characterized by:
AComplex variable-length instructions and small register file
BLarge number of registers, fixed instruction size, and pipelining
CMicrocode-based execution and many addressing modes
DSlow clock speed and large instruction cache
Answer is hidden
Question 66 of 72Computer Architecture & Hardware
What does the Address Generation Unit (AGU) in a CPU do?
AExecutes floating-point operations
BComputes effective memory addresses
CManages cache replacement
DDecodes instruction opcodes
Answer is hidden
Question 67 of 72Computer Architecture & Hardware
Pipelining in CPU design is also known as:
AParallel processing
BMultiprogramming
CAssembly-line operation / Instruction overlapping
DSuperscalar execution
Answer is hidden
Question 68 of 72Computer Architecture & Hardware
How many signal wires does the I²C (Inter-Integrated Circuit) bus use?
Answer is hidden
Question 69 of 72Computer Architecture & Hardware
A microprocessor fetches its next instruction from:
ACache memory
BRegister file
CMain memory (RAM)
DAccumulator
Answer is hidden
Question 70 of 72Computer Architecture & Hardware
In an SPI bus running at 5 MHz with 8-bit frames, what is the time taken per bit?
A0.02 μs
B0.2 μs
C2 μs
D20 μs
Answer is hidden
Question 71 of 72Computer Architecture & Hardware
Which circuit inside the CPU performs arithmetic and logical operations?
AControl Unit
BALU
CRegister File
DMemory Controller
Answer is hidden
Question 72 of 72Computer Architecture & Hardware
In floating-point multiplication, the correct sequence of operations is:
AAdd exponents, multiply mantissas, then normalize and round
BMultiply exponents, add mantissas, then normalize
CSubtract exponents, multiply mantissas, then normalize
DMultiply mantissas, multiply exponents, then round
Answer is hidden