Explore topic-wise MCQs in Capgemini.

This section includes 48 Mcqs, each offering curated multiple-choice questions to sharpen your Capgemini knowledge and support exam preparation. Choose a topic below to get started.

1.

What command is used to count the total number of lines, words, and characters contained in a file?

A. countw
B. wcount
C. wc
D. count p
Answer» D. count p
2.

The Object is not declared for which class?

A. Parent
B. Base
C. Abstract
D. Derived
Answer» D. Derived
3.

The parameter list in function overloading must differ by?

A. Number of functions
B. Function Size
C. Function Name
D. Number of argument
Answer» E.
4.

A Class can have how many destructor?

A. 1
B. 2
C. 3
D. 4
Answer» B. 2
5.

The mechanism that binds code and data together and keeps them secure from outside world is known as

A. Abstraction
B. Encapsulation
C. Inheritance
D. Polymorphism
Answer» C. Inheritance
6.

Which diagram provides a formal graphic notation for modelling objects, classes and their relationships to one another?

A. Object Diagram
B. Analysis Diagram
C. Instance Diagram
D. Class Diagram
Answer» B. Analysis Diagram
7.

Which of the following mode declaration is used in C++ to open a file for input?

A. ios :: app
B. in :: ios
C. ios :: in
D. ios :: file
Answer» D. ios :: file
8.

PHP allow which commenting style?

A. /* */
B. //
C. #
D. All the above
Answer» E.
9.

list in PHP is ?

A. Language construct
B. Keyword
C. A & C Both
D. None of the above
Answer» B. Keyword
10.

__FILE__ is ?

A. Language construct
B. Keyword
C. Compile-time constant
D. None of the above
Answer» D. None of the above
11.

What option should be enable to allow php short tags in php.ini?

A. short_tag
B. short_open_tag
C. asp_tag
D. allow_all_tag
Answer» C. asp_tag
12.

Which is correct statement to terminate PHP statement?

A. Semicolon at the end of each statement
B. The closing tag of a block of PHP code automatically implies a semicolon;
C. Colon at the end of each statement
D. A & B
Answer» E.
13.

Which is correct syntax to declare constant?

A. define("CONSTANT", "Placement Question");
B. const CONSTANT = Placement Question;
C. constant CONSTANT = Placement Question;
D. A & B
Answer» E.
14.

Which of the following is invalid PHP code?

A. $_20
B. &$myVar
C. $20_var
D. ${"var"}
Answer» D. ${"var"}
15.

PHP stands for

A. Process Hypertext Preprocessor
B. Preprocessor Hypertext
C. Hypertext Preprocessor
D. None of the above
Answer» D. None of the above
16.

A PHP scripting block always starts with

A. < ?php ...... ?>
B. <@ ....... />
C. <% .... %>
D. { ..... }
Answer» B. <@ ....... />
17.

In PHP, variable always start with _____?

A. %
B. #
C. &
D. $
Answer» E.
18.

&nbsp; What is most appropriate way to open file &quot;placementquestion.txt&quot; in write mode?

A. openf("placementquestion.txt", "w");
B. fopen("placementquestion.txt", "w");
C. open("placementquestion.txt", "w");
D. fopen("placementquestion.txt", "w+");
Answer» C. open("placementquestion.txt", "w");
19.

In terms of keywords and language syntax, PHP is similar to?

A. C
B. COBOL
C. FORTRAN
D. .Net
Answer» B. COBOL
20.

DCL is used to _______?

A. Manage the changes made by DML statements
B. Inserting, Deleting and Updating data
C. Control access to data stored in a database
D. None of the above
Answer» D. None of the above
21.

TCL is used for _______?

A. Manage the changes made by DML statements
B. Defining database schema
C. Control access to data stored in a database
D. None of the above
Answer» B. Defining database schema
22.

What is Granularity?

A. The size of data items
B. The size of database
C. The size of record
D. The size of file
Answer» C. The size of record
23.

Which level of Abstraction describes what data are stored in the Database?

A. Physical Level
B. View Level
C. Abstraction Level
D. Logical Level
Answer» E.
24.

The problem that occurs when one transaction updates a database item and then the transaction fails for some reason is ________.

A. Dirty Read Problem
B. Temporary Modify Problem
C. Temporary Select Problem
D. None of the above
Answer» B. Temporary Modify Problem
25.

Data Warehouse provides

A. Transaction Responsiveness
B. Demand and Supply Responsiveness
C. Storage, Functionality Responsiveness to queries
D. None of the above
Answer» D. None of the above
26.

Referential integrity is directly related to

A. Relation Key
B. Primary Key
C. Unique Key
D. Foreign Key
Answer» E.
27.

_____ is process of extracting previously non known valid and actionable information from large data to make crucial business and strategic decisions.

A. Data Management
B. Database
C. Data Mining
D. Meta Data
Answer» D. Meta Data
28.

Which of the following statements is NOT true for views in SQL?

A. Select statement used in the view definition cannot include ORDER BY clause
B. A view drives its data from the base tables(s)
C. A view is updatable if it has been defined from a single relation
D. A view contains a copy of the data
Answer» E.
29.

In order to add a new column to an existing table in SQL, we can use the command

A. MODIFY TABLE
B. EDIT TABLE
C. ALTER TABLE
D. ALTER COLUMNS
Answer» D. ALTER COLUMNS
30.

In an RDBMS relationship between tables are created by using

A. Alternate Keys
B. Foreign Keys
C. Candidate Keys
D. Composite Keys
Answer» C. Candidate Keys
31.

BCNF Stands for _________.

A. Binary Coded Normal Form
B. Boyce - Codd Normal Form
C. Bit Code Normal Form
D. Boyce Codd Natural Form
Answer» C. Bit Code Normal Form
32.

The student marks should not be greater than 100. This is

A. Integrity constraint
B. Referential constraint
C. Over-defined constraint
D. Feasible constraint
Answer» B. Referential constraint
33.

Type data abstraction which allows conceptual representation of data in database management system is considered as

A. Logical design model
B. Data model
C. Interface model
D. User friendly model
Answer» C. Interface model
34.

Function which causes retrieval of any kind of data from database is considered as

A. Interface or Signature
B. User friendly signature
C. Conceptual signature
D. Logical signature
Answer» C. Conceptual signature
35.

Drop Table cannot be used to drop a table referenced by a ______________ constraint.

A. Primary Key
B. Sub Key
C. Super Key
D. Foreign Key
Answer» E.
36.

The number of attributes in relation is called as its

A. Cardinality
B. Entity
C. Tuples
D. Degree
Answer» E.
37.

The term attribute refers to a ___________ of a table.

A. Record
B. Column
C. Tuple
D. Key
Answer» C. Tuple
38.

What will be the output of the program? #include #include int main() { int *p; p = (int *)malloc(20); /* Assume p has address of 1314 */ free(p); printf(&quot;%u&quot;, p); return 0; }

A. 1314
B. Garbage value
C. 1316
D. Random address
Answer» B. Garbage value
39.

What is the output of the following &#39;C&#39; program ? #include void main () { const int x = 5; const int *ptrx; ptrx = &amp;x; *ptrx = 10; printf(&quot;%d&quot;, x); }

A. 5
B. Compilation Error
C. 10
D. Garbage value
Answer» C. 10
40.

int main() { show(); return 0; } void show() { printf(&quot;I&#39;m the greatest&quot;); }

A. Compier error: Type mismatch in redeclaration of show.
B. I, the greatest
C. Linker error
D. None of these
Answer» B. I, the greatest
41.

void main() { printf(&quot;%p&quot;,main); }

A. Compilation error
B. Garbage Value
C. Some address will be printed.
D. None of these
Answer» D. None of these
42.

What will be output of the following &quot;c&quot; code? Note: 32 bit compiler #include int main(){ float **(*ptr)[4]=(float **(*)[4])0; ptr+=5; printf(&quot;%d %d&quot;,ptr,sizeof ptr); return 0; }

A. 0 2
B. 160 8
C. 40 2
D. 80 4
E. Compilation error
Answer» E. Compilation error
43.

What will be output of the following &quot;c&quot; code? #include void main() { int i=5; printf(&quot;%d&quot;,i+++++i); }

A. 5
B. 6
C. Compiler Error
D. 7
Answer» D. 7
44.

What will be output of the following &quot;c&quot; code? #include #define max(a,b) (a&gt;b)? a:b int main() { int a,b; a=3; b=4; printf(&quot;%d&quot;,max(a,b)); return 0; }

A. 3
B. 4
C. 12
D. 0
E. Compilation Error
Answer» C. 12
45.

Let S be the original stack and S1 and S2 the two additional stacks then the following pseudo code is to reverse the stack S: while (S not empty) { push(S1,pop(S)); } while(S1 not empty) { push(S2,pop(S1)); } while(S2 not empty) { push(S,pop(S2)); } ?

A. TRUE
B. False
C. Not Answer
Answer» B. False
46.

An algorithm is made up of two independent time complexities f (n) and g (n). Then the complexities of the algorithm is in the order of

A. f(n) x g(n)
B. Max ( f(n),g(n))
C. Min (f(n),g(n))
D. f(n) + g(n)
Answer» C. Min (f(n),g(n))
47.

What is the following code segment doing? void fn( ){ char c; cin.get(c);&nbsp; if (c != &#39;\n&#39;) { fn( ); cout.put(c); } }

A. The string entered is printed as it is
B. The string entered is printed in reverse order.
C. It will go in an infinite loop.
D. It will print an empty line.
Answer» C. It will go in an infinite loop.
48.

Consider the following code segment in C to traverse a binary tree using the preorder typedef struct tree { int info; struct *left; struct *right; }node; void preorder(node *tree) { if (t) { Statementl Statement2 Statement3 } } The above Statements should be

A. preorder(tree->right); preorder(tree->left); printf("%d", tree->info);
B. preorder(tree->left); preorder(tree->right); printf("%d", tree->info);
C. preorder(tree->left); printf("%d", tree->info); preorder(tree->right);
D. printf("%d", tree->info); preorder(tree->left); preorder(tree->right);
Answer» E.