By: Prof. Dr. Fazal Rehman | Last updated: September 20, 2024
Multiple Choice Questions
Basic programming
Set 1
Q1. logA B =…….?a=log A + log B ;b=log A − log B c=XAXB = XA+B d=logA/logB
Answer - Click Here:
A
Q2. we can convert temperatures from Fahrenheit to Celsius by applying the formula ……a=IntCell temporary = 37;b=printDigit( n % 10 );c=C = 5(F − 32)/9d=None of these
Answer - Click Here:
A
Q3. Encapsulation is …….?a= Member functionsb=Information hidingc=Methodsd=Constructor
Answer - Click Here:
B
Q4. A function is being passed by placing it inside an object. This object is commonly known as a ……….a=Function of all operatorb=Function objectc=Operator overloadingd=Object
Answer - Click Here:
B
Q.5. In C++, there are several different mechanisms for returning from a function. The moststraightforward mechanism to use is …….a=Call by valueb=Call by valuec=Return by referenced=Return by value
Answer - Click Here:
D
Q6.Many languages, C and Java included, pass all parameters using ……..a=Call by referenceb=Call by Valuec=Return by valued=Return by reference
Answer - Click Here:
B
Q7. Reference variables are often used to avoid copying objects across ……..a=Function-describe boundariesb=Function-call boundariesc=Function-Constructord=Function destructor
Answer - Click Here:
B
Q.8An …… is an expression that identifies a non-temporary object.a=L valuesb=R valuesc=Referencesd=Values
Answer - Click Here:
A
Q.9 An …….. is an expression that identifies a temporary object or is a value (such as a literal constant) not associated with any object.a=L valuesb=R valuesc=Referencesd=Values
Answer - Click Here:
B
Q10. Assignment and comparison of pointer variables in C++ is based on the value of the ……..a=Pointerb=Classc=Objectd=Variables