0

Information Technology Mixed Test - 12

Description: Information Technology Mixed Test - 12
Number of Questions: 25
Created by:
Tags: Information Technology Mixed Test - 12 Computer Analysis and Design Operating System Programming
Attempted 0/25 Correct 0 Score 0

When a non-fatal I/O error has occurred in the file being currently used, then the value of ______ stream-state is 1.

  1. eofbit

  2. failbit

  3. badbit

  4. goodbit


Correct Option: B
Explanation:

This option is correct because the value of “failbit” is 1, when a non-fatal I/O error is encountered.

What will be the main objective of a multiprogrammed operating system?

  1. To increase response time

  2. To increase CPU utilization

  3. To minimize CPU utilization

  4. Both options 1 and 2


Correct Option: B
Explanation:

By executing multiple programmes at a same time, it will increase or maximize the CPU utilization. By running more than one programmes it uses more resources for executing in less time. Multiprogramming is accomplished due to the differences in I/O and processing speed. While one program is waiting for input, instructions in another program can be executed.

Which one is NOT a function of a loader?

  1. Allocate space in memory for programs

  2. Physically place the machine instructions and data into memory

  3. Resolve symbolic references between objects modules

  4. None of above


Correct Option: D
Explanation:

All above are the functions of loader. Basically, loader have four functions as follows : -  

  1. Allocate space in memory for programs
  2. Resolve symbolic references between objects modules 
  3. Physically place the machine instructions and data into memory  
  4. Adjust all address dependent location such as address constants, to corresponds to allocated space (relocation)

Which logic gate recognizes an odd number of 1s with only words?

  1. FULL adder

  2. NAND gate

  3. Exclusive - OR gate

  4. None of these


Correct Option: C
Explanation:

 EX - OR gate behaves like an odd parity checker. The Ex- OR gate asserts its output when the input stream contains an odd number of 1's . 

Which of the following test and evaluation activities is typically conducted on large, complex systems such as aircraft and military acquirer activity systems?

  1. Developmental testing and evaluation

  2. Operational test and evaluation

  3. Decision support systems

  4. None of these


Correct Option: B
Explanation:

Operational testing and evaluation activities are typically conducted on large, complex systems such as aircraft and military acquirer activity systems.

Which one is not possible in form of memory?

  1. 11 bit address, 1024 bit cell size, 1024 cells

  2. 10 bit address, 12 bit cell size, 1024 cells

  3. 9 bit address, 8 bit cell size, 1024 cells

  4. None of above


Correct Option: C
Explanation:

A 9 bit address, 8 bit cell size, 1024 cells is impossible since the address is too short. We cannot address 1024 cells with only 9 address bits as 29 = 512 So, the cell size is possible but it is not an advisable memory structure and not a standard size.

How many selection lines are required for 8 to 1 multiplexer?

  1. 1

  2. 2

  3. 3

  4. None of above


Correct Option: C
Explanation:

A multiplexer is a circuit with many inputs but only one output. For MUX with n inputs, there must at least m control signals where 2= n, where n = 8, therfore m = 3, 23 = 8 (8x1 MUX) 8 to 1 multiplexer have 3 selection line(s0 ,  s1 and  s2 ), 8 input lines and 1 output. 

When an object is passed by value, _________ constructor is invoked.

  1. default

  2. copy

  3. parameterized

  4. none of the above


Correct Option: B
Explanation:

This option is correct as the copy constructor is invoked when an object is passed by value to a function. The pass by value method requires a copy of passed arguments to be created for the function to operate upon.

Which of the following expressions will result into Boolean true (1) value?

  1. !(0)

  2. !(5)

  3. !(-4)

  4. !(5>2)


Correct Option: A
Explanation:

This option is correct because zero represents Boolean zero and its negation (!) will return Boolean true value, i.e. 1, hence this option is correct.

Which of the following represents the constructor of the class given below? class Student { private: int roll_no; float marks; };

  1. int Student() { roll_no=0; marks=0.0; }

  2. void Student() { roll_no=0; marks=0.0; }

  3. Student() { roll_no=0; marks=0.0; }

  4. Students() { roll_no=0; marks=0.0; }


Correct Option: C
Explanation:

 This option is correct as a constructor always has same name as its class with no return type, not even 'void'.

Which of the following statements is WRONG regarding static member functions?

  1. We declare any function to be static by putting keyword static before the function declaration in the class.

  2. A static member can access all the members of the same class.

  3. Static member function is invoked using the class name, instead of object's name

  4. None of the above


Correct Option: B
Explanation:

This option is correct because given statement is incorrect as static member function can access only static members (functions or variables) of the same class.

Which of the following will result in '0' output?

  1. (6<=6)||(5<3)

  2. !(5>9)

  3. (5>3)&&(6<=6)||(5!=6)

  4. (5<3)&&(6<=6)||(5!=6)


Correct Option: D
Explanation:

If we take half of the expression first (6<=6)||(5!=6) the value of expression (5!=6) and (6<=6) will be Boolean true value and we know that for even one condition to be true the OR (||) operator gives Boolean true value. Now we are left with the rest of the expression (5<3)&&(Prev value obtained), we know that && operator gives Boolean true value if both the conditions are true, but here (5<3) will return Boolean false value and hence the value of the whole expression will be 0.

Which of the following declarations in 'C' begins with '#' symbol?

  1. Variable

  2. Looping structure

  3. Preprocessor directive

  4. None of these


Correct Option: C
Explanation:

 A preprocessor directive statement always begins with '#' symbol in 'C'.

Which of the following functions defined in standard library file math.h returns the smallest integer represented as a double not less than num?

  1. atan2()

  2. fmod()

  3. ceil()

  4. pow()


Correct Option: C
Explanation:

This option is correct as ceil() function returns the smallest integer represented as a double not less than num. Example: ceil(1.30) gives 2.0, ceil(-1.03) gives -1.0

Which of the following loop structures in 'C' executes a block of instruction for the specified number of time?

  1. While loop

  2. For loop

  3. Do-While loop

  4. None of these


Correct Option: B
Explanation:

This looping structure executes a block of instruction for the specified number of time.

Which of the following memory allocation functions frees a block of allocated memory in 'C'?

  1. malloc()

  2. new()

  3. free()

  4. delete()


Correct Option: C
Explanation:

This function is used  to free a block of allocated memory in 'C' program.

____________ refers to the maximum no. of nodes in the tree structure.

  1. Width

  2. Depth

  3. Leaf node

  4. None of these


Correct Option: A
Explanation:

Width of a tree refers to the maximum no. of nodes in the tree structure.

Which of the following file modes in 'C' is used to open a file in both read and write mode as well as to delete the previous data stored in the file?

  1. 'w'

  2. 'r'

  3. 'w+'

  4. 'a'


Correct Option: C
Explanation:

This file mode in 'C' is used to open a file in both read and write mode as well as to delete the previous data stored in the file.

'Switch-Case' statement in 'C' comes under

  1. sequence structure

  2. selection structure

  3. iteration structure

  4. none of these


Correct Option: B
Explanation:

'Switch-Case' statement comes under the selection structure as it allows the user to select appropriate case statement depending upon the choice of the user.

Which of the following functions is used in 'C' to write a single character into an output file?

  1. fgets()

  2. getc()

  3. putc()

  4. none of these


Correct Option: C
Explanation:

This function is used in 'C' to write a single character into an output file.

Which of the following string functions in 'C' searches for a specified character in the string?

  1. strchr()

  2. strupr()

  3. strlwr()

  4. none of these


Correct Option: A
Explanation:

This string function in 'C' searches for a specified character in the string. It returns NULL, if the desired character is not found in the string.

Which of the following is also called as separator in 'C', used to separate literals, variables, statements, etc.?

  1. Label

  2. Comment

  3. Delimiter

  4. None of these


Correct Option: C
Explanation:

Delimiter is also called as separator in 'C', used to separate literals, variables, statements, etc.

The codes given below are trying to add 'n' and the value 250 or 50 depending upon whether sales > 15000 is true or false: CODE 1: bonus = n + sales >15000 ? 250 : 50; CODE 2: bonus = n + (sales > 15000 ? 250 : 50); Which code is correct?

  1. Code1

  2. Code 2

  3. Both codes 1 and 2

  4. None of the codes will give desired result


Correct Option: B
Explanation:

This option is correct as '+' operator is having higher precedence over > and ?: operator but we have used the parentheses to set up the priority and the compiler will read as per our priority setup and get the desired result.

Which of the following statements is WRONG regarding static data member?

  1. There is the only one copy of the data member, maintained for the entire class.

  2. Its lifetime is same as lifetime of the object of the class

  3. Declaration is done within the class definition

  4. Definition is given outside the class definition


Correct Option: B
Explanation:

This option is correct as the given statement is incorrect because however, static data member is visible within the class but its lifetime is the entire program.

Which of the following represents the correct precedence order among ! (NOT), && (AND) and || (OR)?

  1. !> &&> ||

  2. !> ||> &&

  3. &&> ||> !

  4. &&> !> ||


Correct Option: A
Explanation:

This option is correct as precedence of NOT operator is higher than AND and OR operator and precedence of AND operator is higher than OR operator.

- Hide questions