Cocubes Programming Questions 2018 | Cocubes Computer Science Questions

Cocubes programming questions or Cocubes Computer Programming questions are asked in Cocubes Computer science test. Questions in this section are asked from the following topics.

  • Computer Architecture
  • Digital Circuit and Logic Design
  • Data Structures
  • OOPS
  • OS
  • Data Communication
  • Microprocessor and ALP
  • Systems Programming
  • Networks
  • DBMS
  • DAA

Before you start practicing these questions, you can also check

Cocubes Programming Questions with Answers

1) Predict the output:
#include <stdio.h>
    void main()
    {
        int i = 0;
        do
        {
            printf(“CoCubes”);
        } while (i != 0);
    }
a) Nothing
b) C is printed infinite times
c) CoCubes
d) Run time error

Ans:  c

 

2) Predict the output :
#include <stdio.h>
    void main()
    {
        int k = 5;
        int *p = &k;
        int **m  = &p;
        **m = 6;
        printf(“%d\n”, k);
    }
a) 5
b) Compile time error
c) 6
d) Junk

Ans:  c

 

3) Predict the output/error:
#include <stdio.h>
    void main()
    {
        int a[3] = {1, 2, 3};
        int *p = a;
        int **r = &p;
        printf(“%p %p”, *r, a);
    }
a) Different address is printed
b) 1 2
c) 1 1
d) Same address is printed

Ans: d

 

4) What are the advantages of passing arguments by reference?
a) Changes to parameter values within the function also affect the original arguments.
b) There is need to copy parameter values (i.e. less memory used)
c) There is no need to call constructors for parameters (i.e. faster)
d) All of the mentioned

Ans:  d

 

5) Pick out the correct statement.
a) A derived class’s constructor cannot explicitly invokes its base class’s constructor
b) A derived class’s destructor cannot invoke its base class’s destructor
c) A derived class’s destructor can invoke its base class’s destructor
d) None of the mentioned

Ans: b

 

6) Which constructor will initialize the base class data member?
a) derived class
b) base class
c) class
d) none of the mentioned

Ans:  b

 

7) Which of the following applications may use a stack?
a) A parentheses balancing program
b) Tracking of local variables at run time
c) Compiler Syntax Analyzer
d) All of the mentioned

Ans:  d

 

8) Which of the following points is/are true about Linked List data structure when it is compared with array
a) Arrays have better cache locality that can make them better in terms of performance
b) It is easy to insert and delete elements in Linked List
c) Random access is not allowed in a typical implementation of Linked Lists
d) All of the mentioned

Ans:  d

 

9) Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
a) Insertion Sort
b) Quick Sort
c) Heap Sort
d) Merge Sort

Ans:  d

 

10) Depth First Search is equivalent to which of the traversal in the Binary Trees?
a) Pre-order Traversal
b) Post-order Traversal
c) Level-order Traversal
d) In-order Traversal

Ans:  a

 

11) Where the result of an arithmetic and logical operation are stored?
a) In Accumulator
b) In Cache Memory
c) In Instruction Registry
d) In ROM

Ans:  a

 

12) ISP stands for _________
a) Instruction Set Processor
b) Information Standard Processing
c) Interchange Standard Protocol
d) Interrupt Service Procedure

Ans:  a

 

13) The registers, ALU and the interconnection between them are collectively called as _____
a) process route
b) information trail
c) information path
d) data path

Ans:  d

 

14) The maximum frequency at which digital data can be applied to gate is caled
a) Operating speed
b) Propagation speed
c) Binary level transaction period
d) Charging time

Ans:  a

 

15) A comparison between serial and parallel adder reveals that serial order
a) is slower
b) is faster
c) operates at the same speed as parallel adder
d) is more complicated

Ans:  a

 

16) Which of this is not a constituent of residential telephone line?
a) A high-speed downstream channel
b) A medium-speed downstream channel
c) A low-speed downstream channel
d) None of the mentioned

Ans:  c

 

17) Most packet switches use this principle
a) Stop and wait
b) Store and forward
c) Both Stop and wait and Store and forward
d) None of the mentioned

Ans:  b

 

18) What is function of logic gate?
a) It makes logic decisions
b) It works on binary algebra
c) It alternates between 0 and 1 values
d) None of these

Ans:  a

 

19) What is the main difference between calloc() and malloc()?
a) calloc() takes a single argument while malloc() needs two arguments
b) malloc() takes a single argument while calloc() needs two arguments
c) malloc() initializes the allocated memory to ZERO
d) calloc() initializes the allocated memory to NULL

Ans:  b

 

20) Only functions of the class can access the data of the class and they(functions) provides the interface between data, objects and the program. This kind isolation of the data from direct access by the program is called _______________ .
a) Data Abstraction
b) Data Hiding
c) Data Binding
d) Data Encapsulation

Ans:  b

 

Summary
Date of Review
Article Title
Cocubes Programming Questions
Rating
51star1star1star1star1star