# Technical Quiz ( Round-2 )

Approved & Edited by ProProfs Editorial Team
At ProProfs Quizzes, our dedicated in-house team of experts takes pride in their work. With a sharp eye for detail, they meticulously review each quiz. This ensures that every quiz, taken by over 100 million users, meets our standards of accuracy, clarity, and engagement.
| Written by Saisrinivas
S
Saisrinivas
Community Contributor
Quizzes Created: 1 | Total Attempts: 76
Questions: 19 | Attempts: 76  Settings  VISIT - JOIN THE WINNER'S WORLS

• 1.

### A TREE IS A HIERARCHICAL DATA STRUCTURE  THAT CONTAINS..................CONNECTED TO EACH OTHER BY.........................

• A.

VERTEX ,EDGES

• B.

PONTER, EDGES

• C.

LIST,VERTEX

• D.

PATH,VERTEX

• E.

ALL OF THE ABOVE

A. VERTEX ,EDGES
Explanation
A tree is a hierarchical data structure that contains vertices connected to each other by edges. This means that each element in the tree, called a vertex, is connected to other vertices through edges. Therefore, the correct answer is "VERTEX, EDGES".

Rate this question:

• 2.

### THE MAXIMUM NUMBER OF CHILDREN A NODE CAN HAVE IS GENERALLY REFERRED AS

• A.

PATH OF THE TREE

• B.

LENGTH OF THE TREE

• C.

DEGREE OF THE TREE

• D.

ORDER OF THE TREE

• E.

NONE OF THE ABOVE

D. ORDER OF THE TREE
Explanation
The maximum number of children a node can have is referred to as the order of the tree. The order of the tree determines the maximum number of branches or children a node can have, which affects the overall structure and organization of the tree.

Rate this question:

• 3.

### THE OUTPUT OF THE FOLOWING  C PROGRAM IS #include void main() { int i=0; while (i<5) { int j=0,k; j++; k=i*j; i++; } printf("i=%d,j=%d,k=%d",i,j,k); }

• A.

I=4,j=0,k=4

• B.

I=5,j=0,k=4

• C.

I=4,j=0,k=5

• D.

I=5,j=0,k=5

• E.

None of the above

E. None of the above
Explanation
The output of the program will be "i=5,j=0,k=20".
In the given program, a while loop is used to increment the value of i from 0 to 5. Inside the loop, the value of j is always set to 0 and k is calculated as i multiplied by j. Since j is always 0, k will always be 0. After the loop, the printf statement prints the final values of i, j, and k, which are 5, 0, and 0 respectively.

Rate this question:

• 4.

### The average time of a binary search is proportional to : consider the size of search list equal to N

• A.

LogN

• B.

N/2

• C.

N(N-1)/2

• D.

NlogN

• E.

None

A. LogN
Explanation
The average time of a binary search is proportional to logN. This is because in a binary search, the search list is divided in half at each step until the target element is found. This means that the number of steps required to find the target element is equal to the logarithm of the size of the search list. Therefore, the average time complexity of a binary search is logarithmic in the size of the search list.

Rate this question:

• 5.

### How would you round off a value from 1.66 to 2.0?

• A.

Ceil(1.66)

• B.

Floor(1.66)

• C.

Roundup(1.66)

• D.

Roundto(1.66)

• E.

None

A. Ceil(1.66)
Explanation
The ceil() function is used to round up a value to the nearest whole number. In this case, the value 1.66 would be rounded up to 2.0.

Rate this question:

• 6.

### Which of the following special symbol allowed in a variable name?

• A.

* (asterisk)

• B.

| (pipeline)

• C.

- (hyphen)

• D.

-_(underscore)

• E.

None of the above

D. -_(underscore)
Explanation
The special symbol allowed in a variable name is the underscore (-_).

Rate this question:

• 7.

### Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

• A.

Rem = 3.14 % 2.1;

• B.

Rem = modf(3.14, 2.1);

• C.

Rem = fmod(3.14, 2.1);

• D.

Remainder cannot be obtain in floating point division.

C. Rem = fmod(3.14, 2.1);
Explanation
The function fmod() should be used to obtain the remainder after dividing 3.14 by 2.1.

Rate this question:

• 8.

### Is there any difference between following declarations? i.)extern int fun(); ii.) int fun();

• A.

Both are identical

• B.

No difference, except extern int fun(); is probably in another file

• C.

Int fun(); is overrided with extern int fun();

• D.

None of these

B. No difference, except extern int fun(); is probably in another file
Explanation
The answer is "No difference, except extern int fun(); is probably in another file." The reason for this is that both declarations have the same return type and function name, indicating that they are referring to the same function. The only difference is the keyword "extern" in the first declaration, which suggests that the function is defined in another file. This keyword is used to declare that the function is defined elsewhere and is being referenced in the current file.

Rate this question:

• 9.

### Is the following statement a declaration or definition? extern int i;

• A.

Declaration

• B.

Definition

• C.

Function

• D.

Error

A. Declaration
Explanation
The given statement "extern int i;" is a declaration because it introduces the existence of a variable named "i" without defining its value or memory allocation. The keyword "extern" indicates that the variable is defined in another file and this statement is used to inform the compiler about its existence.

Rate this question:

• 10.

### In the following program where is the variable a getting defined and where it is getting declared? #include<stdio.h> int main() { extern int a; printf("%d\n", a); return 0; } int a=20;

• A.

Extern int a is declaration, int a = 20 is the definition

• B.

Int a = 20 is declaration, extern int a is the definition

• C.

Int a = 20 is definition, a is not defined

• D.

A is declared, a is not defined

A. Extern int a is declaration, int a = 20 is the definition
Explanation
In the given program, the line "extern int a;" is a declaration of the variable "a". It tells the compiler that the variable "a" is defined somewhere else in the program. The line "int a = 20;" is the definition of the variable "a", where it is assigned a value of 20. So, the correct answer is "extern int a is declaration, int a = 20 is the definition".

Rate this question:

• 11.

### In which header file is the NULL macro defined?

• A.

Stdio.h

• B.

Stddef.h

• C.

Stdio.h and stddef.h

• D.

Math.h

• E.

None

C. Stdio.h and stddef.h
Explanation
The NULL macro is defined in both stdio.h and stddef.h header files. These header files are part of the C standard library and provide various definitions and functions. stdio.h is used for input and output operations, while stddef.h is used for defining various types and macros, including NULL. Therefore, to use the NULL macro in a C program, one needs to include either stdio.h or stddef.h header file.

Rate this question:

• 12.

### What would be the equivalent pointer expression for referring the array element a [i] [j] [k] [l]

• A.

((((a+i)+j)+k)+l)

• B.

*(*(*(*(a+i)+j)+k)+l)

• C.

(((a+i)+j)+k+l)

• D.

((a+i)+j+k+l)

• E.

None of the above

B. *(*(*(*(a+i)+j)+k)+l)
Explanation
The correct answer is `*(*(*(*(a+i)+j)+k)+l)`. This expression is the equivalent pointer expression for referring to the array element `a[i][j][k][l]`. It uses nested pointer dereferences to access the element at the specified indices. The outermost dereference `*(a+i)` accesses the `i`th element of the array `a`, the next dereference `*(*(a+i)+j)` accesses the `j`th element of the sub-array `a[i]`, and so on until the innermost dereference `*(*(*(*(a+i)+j)+k)+l)` accesses the `l`th element of the sub-sub-sub-array `a[i][j][k]`.

Rate this question:

• 13.

### How many times the program will print "IndiaBIX" ? #include<stdio.h> int main() { printf("IndiaBIX"); main(); return 0; }

• A.

Infinite times

• B.

32767 times

• C.

65535 times

• D.

Till stack overflows

• E.

None

A. Infinite times
Explanation
The program will print "IndiaBIX" infinite times because the main function is recursively calling itself without any condition to stop the recursion. Therefore, the program will keep printing "IndiaBIX" indefinitely until the stack overflows.

Rate this question:

• 14.

### What does the following declaration mean? int (*ptr);

• A.

Ptr is array of pointers to 10 integers

• B.

Ptr is a pointer to an array of 10 integers

• C.

Ptr is an array of 10 integers

• D.

Ptr is an pointer to array

B. Ptr is a pointer to an array of 10 integers
Explanation
The declaration "int (*ptr);" means that "ptr" is a pointer to an array of 10 integers. This means that "ptr" can store the memory address of an array that contains 10 integers.

Rate this question:

• 15.

### In C, if you pass an array as an argument to a function, what actually gets passed?

• A.

Value of elements in array

• B.

First element of the array

• C.

• D.

Address of the last element of array

C. Base address of the array
Explanation
When you pass an array as an argument to a function in C, only the base address of the array gets passed. This means that the function will have access to the memory location where the array starts, allowing it to manipulate or access the elements of the array. The function does not receive the actual values of the elements in the array or the address of the last element.

Rate this question:

• 16.

### If the two strings are identical, then strcmp() function returns

• A.

-1

• B.

1

• C.

0

• D.

Yes

• E.

No

C. 0
Explanation
The strcmp() function is used to compare two strings. If the two strings are identical, strcmp() returns 0.

Rate this question:

• 17.

### Which of the following function is used to find the first occurrence of a given string in another string?

• A.

Strchr()

• B.

Strrchr()

• C.

Strstr()

• D.

Strnset()

• E.

None

C. Strstr()
Explanation
The strstr() function is used to find the first occurrence of a given string within another string. It returns a pointer to the first occurrence of the substring or NULL if the substring is not found. This function is commonly used in string manipulation and searching algorithms.

Rate this question:

• 18.

### What is x in the following program? #include<stdio.h> int main() { typedef char (*(*arrfptr)()); arrfptr x; return 0; }

• A.

X is a pointer

• B.

X is an array of three pointer

• C.

X is an array of three function pointers

• D.

Error in x declaration

C. X is an array of three function pointers
Explanation
In the given program, the declaration "typedef char (*(*arrfptr)());" defines an array of three function pointers named "arrfptr". Therefore, the variable "x" is an array of three function pointers.

Rate this question:

• 19.

### What will the function randomize() do in Turbo C under DOS?

• A.

Returns a random number.

• B.

Returns a random number generator in the specified range.

• C.

returns a random number generator with a random value based on time.

• D.

Return a random number with a given seed value. Back to top