Technical Quiz ( Round-2 )

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Saisrinivas
S
Saisrinivas
Community Contributor
Quizzes Created: 1 | Total Attempts: 91
Questions: 19 | Attempts: 91

SettingsSettingsSettings
Technical Quiz ( Round-2 ) - Quiz


VISIT - JOIN THE WINNER'S WORLS


Questions and Answers
  • 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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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.

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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)[10];

    • 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

    Correct Answer
    B. Ptr is a pointer to an array of 10 integers
    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.

    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.

      Base address of the array

    • D.

      Address of the last element of array

    Correct Answer
    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

    Correct Answer
    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

    Correct Answer
    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[3])())[10]; 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

    Correct Answer
    C. X is an array of three function pointers
    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.

    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.

    Correct Answer
    C. returns a random number generator with a random value based on time.
    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.

    Rate this question:

Quiz Review Timeline +

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
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.