Programming skill MCQs

Programming skill MCQs

Try to answer these 100+ Programming skill MCQs and check your understanding of the Programming skill subject. Scroll down and let's begin!

1: (char)('a' + math.random() * ('z' - 'a' + 1)) returns a random character __________.

A.   Between 'b' and 'z'

B.   Between 'a' and 'y'

C.   Between 'b' and 'y'

D.   Between 'a' and 'z'

2: A ________ is a member function that is automatically called when a class object is ________.

A.   Destructor, created

B.   Constructor, created

C.   Static function, deallocated

D.   Utility function, declared

E.   None of these

3: A ________ of a base class expects to be overridden in a derived class.

A.   Constructor function

B.   Destructor function

C.   Static function

D.   Virtual function

4: A member function that is declared ________ cannot use the this pointer.

A.   Private

B.   Public

C.   Static

D.   Inline

E.   None of these

5: A program that tests a function is called a _____ program.

A.   Value

B.   Scope

C.   Reference

D.   Driver

6: A subscript is a(n) _____.

A.   Element in an array

B.   Alternate name for an array

C.   Number that represents the highest value stored within an array

D.   Number that indicates the position of an array element

7: A two-dimensional array can be viewed as ________ and ________.

A.   Rows, columns

B.   Arguments, parameters

C.   Increments, decrements

D.   All of these

8: A two-dimensional array can have elements of ________ data type(s).

A.   One

B.   Two

C.   Four

D.   Any of these

E.   None of these

9: A two-dimensional array of characters can contain ________.

A.   Strings of the same length

B.   Strings of different lengths

C.   Uninitialized elements

D.   All of these

E.   None of these

10: A variable usually is passed into a method by ____.

A.   Argument

B.   Parameter

C.   Both

D.   None of these

11: A(n) ____ function is a nonmember function that has access to all members of the class.

A.   Friend

B.   Access

C.   Void

D.   Protected

12: A(n) _____ is a specific member of a class

A.   Key

B.   Lifeline

C.   Index

D.   Instance

13: Arguments are passed to the base class destructor function by the ________ class ________ function.

A.   Derived, constructor

B.   Derived, destructor

C.   Base, constructor

D.   Base, destructor

E.   None of these

14: Arrays may be ________ at the time they are ________.

A.   Initialized, declared

B.   Declared, initialized

C.   Assign, initialized

D.   Initialized ,assign

15: Cellpadding value is expressible in ____.

A.   Spanning

B.   Tables

C.   Hsides

D.   Pixels

E.   Highest

16: For (k = 0; k < 9; k++) if (name[k] _______ “ “) then write name[k] end if end for

A.   =

B.   >

C.   <

D.   ==

17: Forms are created using the ____ element.

A.  

B.  

C.  

D.  

18: Grouping is ________.

A.   Represents the consolidated data of a PivotTable visually

B.   Click the field's arrow in the VALUES area and select Value Field Settings.

C.   Summary statistics do not change to reflect the values selected in the slicer.

D.   Joining rows or columns of related data into a single entity for analysis

19: If you leave out the size declarator in an array declaration ________.

A.   You must furnish an initialization list

B.   You are not required to initialize the array elements

C.   All array elements default to zero values

D.   Your array will contain no elements

20: Protected members of a base class are like ________, but they may be accessed by derived classes.

A.   Private members

B.   Public members

C.   Protected members

D.   None of these

21: The ____ function converts all of the letters in a string to capital letters.

A.   Strtoupper()

B.   Stringtoupper()

C.   Strtolower()

D.   Stringtolower

22: The ____ operator is evaluated first in the following expression: 9 * 2 - 8 > 5 + 2 / 2.

A.   +

B.   -

C.   /

D.   *

23: the _____ command would be used to delete the table row where the p_code is 'brt-345'.

A.   DELETE FROM PRODUCT WHERE P_CODE = 'BRT-345';

B.   REMOVE FROM PRODUCT WHERE P_CODE = 'BRT-345';

C.   ERASE FROM PRODUCT WHERE P_CODE = 'BRT-345';

D.   ROLLBACK FROM PRODUCT WHERE P_CODE = 'BRT-345';

24: The __________ function will return the number of characters in a given string.

A.   Add()

B.   Length_Of()

C.   Return()

D.   All of these

25: The characters +, -, *, and / are examples of ____.

A.   Arithmetic operators

B.   Special Operators

C.   Both

D.   None of these

26: The code to create a random integer between 1 and 100 is __________(random * 100) + 1.

A.   (math.random()* 100) + 1.

B.   Math.random()

C.   Math.random()*100

D.   None of these

27: The compiler performs ________ on virtual functions.

A.   Static binding

B.   Inheritance binding

C.   Overridden binding

D.   Dynamic binding

28: The destructor function's return type is ________.

A.   Tilde

B.   Int

C.   Float

D.   Nothing. Destructors have no return type

E.   None of these

29: The linear search is adequate for searching through ________ arrays, but not through ________ ones.

A.   Small, large

B.   Char, string

C.   Int, double

D.   Any regular, vector

E.   Ascending, descending

30: The procedures that the object performs are known as ________.

A.   Methods

B.   Functions

C.   Class

D.   None of these

31: The statement ____ creates the vector object veclist of size size.

A.   Vector[elemType] vecList(size);

B.   Vector vecList(size);

C.   Vector(size) vecList

D.   Vector{elemType::size} vecList

32: The statement: return 2 * 3 + 1, 1 + 5; returns the value ____.

A.   2

B.   3

C.   6

D.   7

33: The statement: return 37, y, 2 * 3; returns the value ____.

A.   2

B.   3

C.   6

D.   7

34: The static method ________ of class string returns a formatted string.

A.   Printf

B.   Format

C.   FormatString

D.   ToFormatString

35: The syntax for accessing a struct member is structvariablename____.

A.   .memberName

B.   Members

C.   .(dot)

D.   None of these

36: The system.currenttimemillis() returns ________.

A.   The current time in milliseconds since midnight, January 1, 1970 GMT (the Unix time)

B.   The current time in ninoseconds since midnight, January 1, 1970 GMT (the Unix time)

C.   The current time in seconds since midnight, January 1, 1970 GMT (the Unix time)

D.   The current time in min since midnight, January 1, 1970 GMT (the Unix time

37: ____ are the characteristics that define an object as part of a class.

A.   Attributes

B.   Primitive

C.   Static

D.   Overloading

38: ____ enables an object to derive one or more of its attributes from another object.

A.   Concatenation.

B.   Encapsulation.

C.   Inheritance.

D.   Polymorphism

39: ____ is shorthand to set the top, right, bottom, and left space around an element.

A.   Padding

B.   Column

C.   Header

D.   Border-spacing

40: ____ occurs when a method is defined in terms of itself.

A.   Referential integrity

B.   Repeatability

C.   Dependence

D.   Recursion

41: _____ is a string function that returns the number of characters in a string value.

A.   LENGTH

B.   SUBSTRING

C.   CONCAT

D.   UCASE

42: ________ is a construct that defines objects of the same type.

A.   A class

B.   A method

C.   An object

D.   A data field

43: _____ is a generic grouping element.

A.  

B.  

C.  

D.  

44: _____ refers to a systematic approach for developing training programs.

A.   Total quality management

B.   Continuous learning

C.   The training design process

D.   Orientation training program

45: __________ are the three types of attribute sets.

A.   Experimental research

B.   Will the research be useful?

C.   Universal, retrieval, and evoked

D.   An unsatisfied need

46: A control that combines the features of a text box and a list box is a ____.

A.   Picture box

B.   Check box

C.   Option button

D.   Combo box

47: A derived attribute ____.

A.   Has many values

B.   Must be stored physically within the database

C.   Must be based on the value of three or more attributes

D.   Need not be physically stored within the database

48: A function may return a pointer, but the programmer must ensure that the pointer ________.

A.   The address of an existing object of the appropriate type

B.   Int ptr = int *num1;, int ptr = &num1;, float num1 = &ptr2;, All are invalid

C.   Is pointing to an object that is still valid after the return of the function

D.   Point to storage allocated by the new operator

49: A measure of how many of the intended tasks users can perform with the technology is called ____.

A.   Effectiveness

B.   Learnability

C.   Usefulness

D.   Attitude

50: A piece of information about a particular object is called a(n) _______.

A.   Abstract

B.   Attribute

C.   True

D.   Concrete