Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

A possible output of the following program fragment isfor (i=getchar();; i=get.char())if (i==‘x’) break;else putchar(i); (A) mi(B) mix(C) mixx(D) none of the above  

Answer»

Correct option - (D) none of the above

Explanation:-

None of the above as it is wrong syntax. 

2.

Who built the Kailasantha temple? Where was it built?

Answer»

Rashrakuta King Krishna-I built it at Ellora.

3.

The second largest number from a set of n distinct numbers can be found in(A) O(n)(B) O(2n)(C) O(n2 )(D) O(log n)  

Answer»

Correct option - (A) O(n) 

4.

A complete Binary Tree with 15 nodes contains________edges(A) 15(B) 30(C) 14(D) 16

Answer»

Correct option- (C) 14

5.

The largest and the second largest number from a set of n distinct numbers can be found in(A) O (n).(B) O (2n).(C) O (n2 )   .(D) O (log n). 

Answer»

Correct option- (A) O (n). 

6.

Name any two Mathas established by Madhwacharya.

Answer»

Madhwacharya established 8 mathas in Udupi. They are 

1. Sodey matha 

2. Sirur matha 

3. Kaniyur matha 

4. Pejawar matha 

5. Palimaru matha 

6. Adamaru matha 

7. Krishnapura matha 

8. Puttige matha.

7.

Write any two causes for the failure of the First War of Indian Independence.

Answer»

Causes for the failure of the first war of Indian independence were the following.

1. There was no common aim among the rebels, Lack of unity, Lack of Leadership, Lack of arms, lack of proper organization, etc. 

2. The British fully utilisyed the scientific developments like modern weapons, telegraphs, railways, postal, etc., to collect information quicker than the Indian soldiers and were ready and prepared to take proper action.

8.

Between whom was the Battle of Plassey fought?

Answer»

The battle of Plassey was fought between Siraj ud aulah the Nawab of Bengal and Robert Clive (British) in 1757.

9.

Mention any two persons who influenced Shivaji.

Answer»

Mother Jijabai, teacher Dadaji Kondadeva, Saints like Ramdasand Tukaram influenced Shivai.

10.

The minimum number of comparisons required to find the largest number from 4 different numbers are (A) 4(B) 3(C) 5(D) 6 

Answer»

Correct option- (B) 3

11.

The extra key inserted at the end of the array is called a(A) End Key(B) Stop Key (C) Sentinel(D) Transposition 

Answer»

Correct option- (C) Sentinel 

12.

Graphs are represented using(A) Adjacency tree(B) Adjacency linked list(C) Adjacency graph(D) Adjacency queue  

Answer»

Correct option- (B) Adjacency linked list

13.

Which of the following operations is performed more efficiently by doubly linked list than by singly linked list(A) Deleting a node whose location is given.(B) Searching of an unsorted list for a given item.(C) Inserting a new node after node whose location is given.(D) Traversing the list to process each node. 

Answer»

Correct option- (A) Deleting a node whose location is given. 

14.

A data structure in which an element is added and removed only from one end, is known as(A) Queue(B) Stack(C) In-built structure(D) None of the above 

Answer»

Correct option- (B) Stack 

15.

One can determine whether a Binary tree is a Binary Search Tree by traversing it in(A) Preorder(B) Inorder(C) Postorder(D) Any of the three orders  

Answer»

Correct option-(B) Inorder 

16.

A C program to print n values of following sequence 1 –1 1 –1 1 … is listed below:  

Answer»

#include  <studio.h 

#include<conio.h>

main()

{

int i,j,n,k;

clrscr();

printf("\n enter number \n");

scanf("%d",&n); 

k=1;

for(i=1;i<=n;i++)

{

for(j=1;j<=i;j++)

printf("%d",k);

printf("\t");

}

getch();

}  

17.

Explain various classes of datatypes of C

Answer»

Following are the major classes of data types in C language:

1. Primary data types: Also known as fundamental/basic data types. All C compliers support four basic data types namely: integer(int), character(char), floating(float), and double precision floating point (double). Then there are extended data types such as long int, double int.

2. Derived data types: also known as secondary or user-defined data types. These data types, derived from basic data types, include arrays, pointer, structure, union, enum etc. 

18.

10 J of heat is supplied to a system and a work of 30 J performed on it. If 50 J of heat is removed from the system, which type of system is it?(a) Steady state(b) Unsteady state(c) Closed(d) None of the mentioned

Answer» The correct answer is (b) Unsteady state

Easy explanation: ∆E is not equal to zero.
19.

A reaction for which heat must be removed from the system to maintain isothermal condition is called(a) Endothermic Reaction(b) Exothermic Reaction(c) Neutral Reaction(d) None of the mentioned

Answer» Correct answer is (b) Exothermic Reaction

To explain I would say: A reaction for which heat must be removed from the system to maintain isothermal condition is called Exothermic Reaction.
20.

Rusting of Fe is(a) Exothermic(b) Endothermic(c) No heat transfer(d) None of the mentioned

Answer» Correct option is (a) Exothermic

The best I can explain: Combustion is an Exothermic Reaction as heat is released.
21.

The result of evaluating the following postfix expression is 5, 7, 9, *, +, 4, 9, 3, /, +, - (A) 50(B) 65(C) 61(D) 69 

Answer»

Correct option- (C) 61 

22.

The maximum number of nodes in a binary tree of depth 5 is(A) 31(B) 16(C) 32(D) 15

Answer»

Correct option- (A) 31

23.

The correct statement is(a) G = P + R(b) G = P – R(c) GP = R(d) All of the mentioned

Answer» Right choice is (a) G = P + R

The explanation is: For the recycle process, use total balance for second part of the process.
24.

For the given process, A is(a) Recycle(b) Purge(c) Bypass(d) None of the mentioned

Answer» Correct option is (c) Bypass

To elaborate: A Bypass stream is one that skips one or more stages of the process and goes directly to another downstream stage.
25.

The volume of blood within the dialyzer is known as __________(a) secondary volume(b) quarterly volume(c) priming volume(d) residual volume

Answer» The correct choice is (c) priming volume

The best explanation: The volume of blood within the dialyzer is known as priming volume.  It is desirable that this should be minimal. Priming volume of present day dialyzers ranges from 75 to 200 ml, depending on the membrane area geometry and operating conditions.
26.

For implementing recursive function the data structure used is:(A) Queue(B) Stack(C) Linked List(D) Tree 

Answer»

Correct option- (B) Stack

Explanation:-

For implementing recursive function, stack is used as a data structure.  

27.

Recursive procedures are implemented by using ____ data tructure.(A) queues.(B) stacks.(C) linked lists.(D) strings. 

Answer»

Recursive procedures are implemented by using stacks data tructure. 

28.

Which of the following is not a property of a magnesium alloy?(a) High damping capacity(b) High electrical conductivity(c) Good fatigue strength(d) High thermal resistivity

Answer» The correct choice is (d) High thermal resistivity

Easiest explanation: Magnesium on getting mixed with other elements starts possessing many different properties. It contains good damping capacity, good electrical conductivity and good fatigue strength, but not, thermal resistivity.
29.

The number of edges in a simple, n-vertex, complete graph is(A) n*(n-2).(B) n*(n-1).(C) n*(n-1)/2.(D) n*(n-1)*(n-2) 

Answer»

Correct option- (C) n*(n-1)/2

30.

A graph 'G' with 'n' nodes is bipartite if it contains(A) n edges.(B) a cycle of odd length.(C) no cycle of odd length.(D) n2 edges. 

Answer»

(C) no cycle of odd length. 

31.

A graph with n vertices will definitely have a parallel edge or self loop if the total number of edges are(A) more than n(B) more than n+1(C) more than (n+1)/2(D) more than n(n-1)/2 

Answer»

Correct option- (D) more than n(n-1)/2

32.

Explain the difference between a function declaration and function definition. 

Answer»

Function declaration and Function definition: 

A function declaration contains the name of the function, a list of variables that must be passed to it, and the type of variable it returns, if any. For example in the following program in line 2, the function cube is declared. The variables to be passed to the function are called arguments, and they are enclosed in parentheses following the function's name. In this example, the function's argument is long x. The keyword before the name of the function indicates the type of variable the function returns. In this case, a type long variable is returned. The function itself is called the function definition. In the following example, a function cube is defined from line 13 to 18.A function definition has following several parts: 

•Function header: The function starts out with a function header on line 13. The function header is at the start of a function, and it gives the function's name, the function's return type and describes its arguments. The function header is identical to the function declaration minus the semicolon.

• Function Body: The body of the function, lines 14 through 18, is enclosed in braces. The body contains statements that are executed whenever the function is called. Local variables are declared within a function body. Finally, the function concludes with a return statement on line 17, which signals the end of the function and it passes a value back to the calling program. 

The following program uses a function to calculate the cube of a number.

1: #include 

2: long cube(long x); 

3: long a, result; 4: main() 

5: { 

6: printf("Enter an integer value: "); 

7: scanf("%d", &a); 

8: result= cube(a); 

9: printf("\nThe cube of %ld is %ld.\n", a, result); 

10: } 

11: 

12: /* Function: cube() - Calculates the cube value of a variable */ 

13: long cube(long x) 

14: { 

15: long y; 

16: y = x * x * x; 

17: return y; 

18: } 

33.

The postfix form of A ^ B * C - D + E/ F/ (G + H),(A) AB^C*D-EF/GH+/+(B) AB^CD-EP/GH+/+*(C) ABCDEFGH+//+-*^(D) AB^D +EFGH +//*+ 

Answer»

Correct option- (A) AB^C*D-EF/GH+/+

34.

The spanning tree of connected graph with 10 vertices contains(A) 9 edges(B) 11 edges(C) 10 edges(D) 9 vertices

Answer»

Correct option- (A) 9 edges

35.

The search technique for searching a sorted file that requires increased amount of space is(A) indexed sequential search(B) interpolation search(C) sequential search(D) tree search  

Answer»

Correct option- (A) indexed sequential search

Explanation:-

The search technique for searching a sorted file that requires increased amount of space is indexed sequential search. Because in this search technique we need to maintain a separate index file which requires additional storage space.  

36.

A sorted file contains 16 items. Using binary search, the maximum number of comparisons to search for an item in this file is  (A) 15(B) 8(C) 1(D) 4

Answer»

Correct option- (D) 4 

37.

Explain the concept of top-down design for a program

Answer»

Top down Design:

A top-down approach is essentially breaking down a system to gain insight into its compositional sub-systems. In a top-down approach an overview of the system is first formulated, specifying but not detailing any first-level subsystems. Each subsystem is then refined in greater detail, sometimes in many additional subsystem levels, until the entire specification is reduced to base elements. In short the top down approach means decomposing of the solution procedure into subtasks. This approach produces a readable and modular code that can be easily understood and maintained. Top-down programming is a programming style in which design begins by specifying complex pieces and then dividing them into successively smaller pieces.

Eventually, the components are specific enough to be coded and the program is written. The technique for writing a program using top-down methods is to write a main procedure that names all the major functions it will need. Later, the programming team looks at the requirements of each of those functions and the process is repeated. These compartmentalized sub-routines eventually will perform actions so simple they can be easily and concisely coded. When all the various subroutines have been coded the program is done. 

38.

What is a pre-processor? Which pre-processor is used to define a macro?

Answer»

A pre-processor is a program that processes the source code before it passes through the compiler. It operates under the control of preprocessor directive. These are placed in the source program before the main. 

To define a macro, # define statement is used. This statement, also known as macro definition takes the following general form: 

#define identifier string

The pre-processor replaces every occurrence of the identifier in the source code by the string. The preprocessor directive definition is not terminated by a semicolon. For example 

#define COUNT 100 will replace all occurrences of COUNT with 100 in the whole program before compilation. 

39.

The sort which inserts each elements A(K) into proper position in the previously sorted sub array A(1), ..., A(K–1)(A) Insertion sort(B) Radix sort(C) Merge sort(D) Bubble sort

Answer»

Correct option - (A) Insertion sort 

40.

Compare the use of switch statement with the use of nested if-else statement. 

Answer»

If-else statement: When there are multiple conditional statements that may all evaluate to true, but we want only one if statement's body to execute. We can use an "else if" statement following an if statement and its body; that way, if the first statement is true, the "else if" will be ignored, but if the if statement is false, it will then check the condition for the else if statement. If the if statement was true the else statement will not be checked. It is possible to use numerous else if statements to ensure that only one block is executed. 

#include <Stdio .h>

void main()

{

int age;

printf( "Please enter your age" );

scanf( "%d", &age );

if ( age < 100 ) {

printf ("You are pretty young!\n" ); }

else if ( age == 100 ) {

printf( "You are old\n" );

}

else {

printf( "You are really old\n" );

}

Switch case statements are a substitute for long if statements that compare a variable to several "integral" values ("integral" values are simply values that can be expressed as an integer, such as the value of a char).The value of the variable given into switch is compared to the value following each of the cases, and when one value matches the value of the variable, the computer continues executing the program from that point. The condition of a switch statement is a value. The case says that if it has the value of whatever is after that case then do whatever follows the colon. The break is used to break out of the case statements. Break is a keyword that breaks out of the code block, usually surrounded by braces, which it is in. In this case, break prevents the program from falling through and executing the code in all the other case statements.

#include<stdio .h>

#include<con. h>

void main()

{

int flag;

printf( "Enter any value\n" );

scanf( "%d", &flag );

switch ( flag ) {

case 1:

printf( "It is hot weather!\n" );

break;

case 2:

printf( "It is a stormy weather!\n" );

break;

case 3:

printf( "It is a sticky weather!\n" );

break;

default:

printf( "It is a pleasant weather!\n" ); 

break;

}

getch();

}

41.

Define a structure for an employee of an organization having employee code, name, address, phone number and number of dependents. Assume that “allEmployees” is an array of employees in ascending order on the employee code. Write a function to display the details of an employee given its employee code. 

Answer»

A structure for an employee and a function to display the details of an employee:

struct employee

{

int emp_code;

char emp_name[30];

char emp_address[50];

char emp_ph_num[10]; int no_of_dep;

allEmployees[100],b;

void display()

{

int ctr=0;

fp=fopen("employee.c","r");

rewind(fp)

while(fread(&allEmployees,sizeof(allEmployees[i]),1

fp)==1)

{

ctr++;

clrscr();

heading();

printf("\n\n\n\

Following are the details :-");

printf("\n\n\tRecord #%d",ctr);

printf("\n\n\t\tCode : %d",allEmployees[i].emp_code)

printf("\n\n\t\tName : %s",allEmployees[i].emp_name)

printf("\n\n\t\tAddress : %s",allEmployees[i].emp_address)

printf("\n\n\t\tPhoneNumber:%s"allEmployees[i].emp_ph_num

printf("\n\n\t\tNumber.Dependents

%s",allEmployees[i].no_of_dep);

printf("\n\n\n\n\t\tPlease Press Enter...");

getch();

}

}  

42.

Choose the directive that is used to remove previously defined definition of the macro name that follows it - (A) # remdef(B) # pragma(C) # undef(D) # define

Answer»

Correct option - (C) # undef

Explanation:-

The preprocessor directive #undef OKAY would cause the definition of OKAY to be removed from the system.  

43.

What are escape sequences characters? List any six of them.

Answer»

The characters which when used with output functions like printf( ),putc(),put() etc. helps in formatting the output are known as Escape sequence character. 

The following is a list of six escape sequences.

\n Newline

\t Horizontal Tab

\v Vertical Tab

\b Backspace

\r Carriage Return

\\ Backslash

44.

Give the outputs of the following code segments, if any and justify your answers.

Answer»

(i) #define CUBE(x)

(x * x * x)

main( ) {

printf(“%d”, CUBE(4+5));

}

(ii) int j = 5;

printf(“%d”, j = j == 6);

printf(“%d”, j = ++j == 6);

(iii)for (j = 0; j = 3; j++)

printf(“%d”, j);

(iv)main( )

{

static char a[ ] = “Test String”;

static char *b = “Test String”;

printf(“%d %d”, sizeof(a), sizeof(b));

}

(v) main( )

{

enum test

{RED, BLUE, GREEN}; enum test t = BLUE;

printf(“%d”, t); }

(vi) main( ) {

union U { int j; char c; float f;}

u; u.j = 10; u.c = ‘A’; u.f = 99.99;

printf(“u.j = %d u.c = %c u.f = %f”, u.j, u.c, u.f);

}

(i) Output is: 49 macro cube(x *x*x) is expanded into (4+5*4+5*4+5) which is evaluated as 4+20+20+5=49 due to priority of operators. So output is 49.

(ii) Output is: 0 0 Both the expressions are evaluated as 0 so the output is 0.

(iii) Output is: infinite loop There is an incorrect assignment, j=3 in test expression.

(iv) Output is:12 2, The printf is printing the size of char array a and char b, null char is included.

(v) Output is:1, The compiler automatically assigns integer digits beginning with 0 to all the enumeration constants so BLUE has value 1.

(vi) Output is: u.j=1311,u.c=’β’,u.f=99.989998 The first two outputs are erroneous output which is machine dependent. During accessing a union member, we should make sure that we are accessing the member whose value is currently stored otherwise we will get errors. 

45.

Which of the following types of expressions do not require precedence rules for evaluation?(A) fully parenthesised infix expression(B) postfix expression(C) partially parenthesised infix expression(D) more than one of the above 

Answer»

Correct option- (A) fully parenthesised infix expression 

46.

What are the beliefs of Alwars?

Answer»

Alwars were the famous Tamil Poet Saints of Tamil Nadu and also called as Azhwars. They praised the Hindu Supreme God Vishnu and his Avatar Krishna with their own composed songs. The Alwars had the belief that Vaishnavism and Lord Vishnu were the supreme beings and look after the devotees with compassion.

47.

puts(argv[0]);(A) prints the name of the source code file.(B) prints argv(C) prints the number of command line arguments.(D) prints the name of the executable code file.  

Answer»

Correct option - (D) prints the name of the executable code file.

Explanation:-

argv[0] represent the filename where the executable code of the program is stored. 

48.

printf(“%–10s”, “ABDUL”); displays(A) ABDULbbbbb(B) bbbbbABDUL(C) ABDULbbbbbbbbbb(D) bbbbbbbbbbABDUL

Answer»

Correct option - (A) ABDULbbbbb

Explanation:-

-10s will print ABDUL in 10 space ABDUL followed by 5 blank space. 

49.

Which of the following can be used to store a large number of files in a small amount of storage space?A. file adjustmentB. file copyingC. file readingD. file compression

Answer» Correct Answer - D
50.

How can a file be saved in a computer with other name?A. Save commandB. Save as commandC. Place commandD. duplicate command

Answer» Correct Answer - B
When we save a file, we can save it to a folder on our hard disk drive, a network location, disk, DVD, VD, the desktop, flash drive, or save as another file formate. Save as optionis the way to save the data to a different file format.