Technical Quiz ( Round-2 )

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Saisrinivas
S
Saisrinivas
Community Contributor
Quizzes Created: 1 | Total Attempts: 111
| Attempts: 111 | Questions: 19
Please wait...
Question 1 / 19
0 %
0/100
Score 0/100
1. A TREE IS A HIERARCHICAL DATA STRUCTURE  THAT CONTAINS..................CONNECTED TO EACH OTHER BY.........................

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".

Submit
Please wait...
About This Quiz
Technical Quiz ( Round-2 ) - Quiz

TECHNICAL QUIZ (ROUND-2) assesses knowledge in programming and computer science fundamentals, such as data structures, algorithms, and C programming. It evaluates understanding of trees, binary search, variable naming, and basic output in C programs. Suitable for learners aiming to enhance technical skills.

Personalize your quiz and earn a certificate with your name on it!
2. Which of the following special symbol allowed in a variable name?

Explanation

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

Submit
3. Is the following statement a declaration or definition? extern int i;

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.

Submit
4.  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;

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".

Submit
5. How would you round off a value from 1.66 to 2.0?

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.

Submit
6. If the two strings are identical, then strcmp() function returns

Explanation

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

Submit
7. What does the following declaration mean? int (*ptr)[10];

Explanation

The declaration "int (*ptr)[10];" 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.

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

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.

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

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.

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

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.

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

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.

Submit
12. 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); }

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.

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

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.

Submit
14.  What would be the equivalent pointer expression for referring the array element 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]`.

Submit
15. THE MAXIMUM NUMBER OF CHILDREN A NODE CAN HAVE IS GENERALLY REFERRED AS

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.

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

Explanation

In the given program, the declaration "typedef char (*(*arrfptr[3])())[10];" defines an array of three function pointers named "arrfptr". Therefore, the variable "x" is an array of three function pointers.

Submit
17. What will the function randomize() do in Turbo C under DOS?

Explanation

The function randomize() in Turbo C under DOS will return a random number generator with a random value based on time. This means that each time the function is called, it will generate a different random number. The random value is based on the current time, ensuring that the generated numbers are unpredictable and not repetitive.

Submit
18. In which header file is the NULL macro defined?  

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.

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

Explanation

The function fmod() should be used to obtain the remainder after dividing 3.14 by 2.1.

Submit
View My Results

Quiz Review Timeline (Updated): Oct 4, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Oct 04, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jul 19, 2012
    Quiz Created by
    Saisrinivas
Cancel
  • All
    All (19)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
A TREE IS A HIERARCHICAL DATA STRUCTURE  THAT...
Which of the following special symbol allowed in a variable name?
Is the following statement a declaration or definition? extern int i;
 In the following program where is the variable a getting defined...
How would you round off a value from 1.66 to 2.0?
If the two strings are identical, then strcmp() function returns
What does the following declaration mean? int (*ptr)[10];
Which of the following function is used to find the first occurrence...
In C, if you pass an array as an argument to a function, what actually...
How many times the program will print "IndiaBIX" ? ...
Is there any difference between following declarations?...
THE OUTPUT OF THE FOLOWING  C PROGRAM IS...
The average time of a binary search is proportional to :...
 What would be the equivalent pointer expression for referring...
THE MAXIMUM NUMBER OF CHILDREN A NODE CAN HAVE IS GENERALLY REFERRED...
What is x in the following program? ...
What will the function randomize() do in Turbo C under DOS?
In which header file is the NULL macro defined?  
Which of the following statements should be used to obtain a remainder...
Alert!

Advertisement