Programming Fundamentals

Computer Programming Knowledge and Computer Applications Test for MCA Entrance and General Knowledge Tests and Preparation Materials

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which among these are used to store the data permanently?

  1. Structures
  2. Arrays
  3. Variables
  4. Files
Question 2 Multiple Choice (Single Answer)

Arrays and structures can be represented by

  1. text files
  2. unformatted files
  3. formatted data files
  4. none of these
Question 3 Multiple Choice (Single Answer)

Which of the following file types is used to close a file?

  1. r
  2. w
  3. rw
  4. r+
Question 4 Multiple Choice (Single Answer)

If the queue is represented by an array, then which of the following is true?

  1. There are possibilities of overflow.
  2. Efficient access to the items in the queue is not possible.
  3. Items in the middle of the queue can be removed or deleted.
  4. Items can be stored in the non-contiguous memory locations.
Question 5 Multiple Choice (Single Answer)

A file pointer is_______________________

  1. a stream pointer
  2. a buffer pointer
  3. a pointer to a file data type
  4. all of the above
Question 6 Multiple Choice (Single Answer)

_________________ function is used to check the end of file condition.

  1. NULL
  2. EOF
  3. FEOF
  4. !NULL
Question 7 Multiple Choice (Single Answer)

I/O stream can be _______

  1. a text stream
  2. a binary stream
  3. both 1 and 2
  4. an I/O operation
Question 8 Multiple Choice (Single Answer)

What is the result of the following postfix e 6 3 3 + - 3 8 2 / + + 2 $ 3 + expression?

  1. 52
  2. 172
  3. 8.5
  4. 16807
Question 9 Multiple Choice (Single Answer)

If (front == rear) then

  1. the queue contains only one item
  2. the queue is empty
  3. the queue contains two elements
  4. underflow condition will occur
Question 10 Multiple Choice (Single Answer)

____________________ file is the output of a compiler.

  1. .c
  2. .h
  3. .obj
  4. .exe
Question 11 Multiple Choice (Single Answer)

Which of the following is a static data stucture?

  1. Stacks
  2. Arrays
  3. Queues
  4. Linked lists
Question 12 Multiple Choice (Single Answer)

Among the following, which is not a type of debugging?

  1. Inspection of code
  2. Random checking
  3. Debugging, using logging
  4. Debugging, using IDE
Question 13 Multiple Choice (Single Answer)

Data types whose properties are independent of any implementation are called

  1. ADT
  2. ntegers
  3. float
  4. none of these
Question 14 Multiple Choice (Single Answer)

In a queue, the end from which an item is deleted is called

  1. rear
  2. front
  3. top
  4. begin
Question 15 Multiple Choice (Single Answer)

___________file is the output of a linker.

  1. .c
  2. .h
  3. .obj
  4. .exe
Question 16 Multiple Choice (Single Answer)

The output of the following code snippet is ___________ ( ) Unsigned
int icount=1;
While(icount<10);
{
Printf(%u,icount);
}

  1. 1,2,_ _ _ 10
  2. an infinite loop
  3. 1,2,3 _ _ _ 9
  4. error in code
Question 17 Multiple Choice (Single Answer)

The expression has to be evaluated right -to-left or left -to-right depends on the operators____

  1. precedence
  2. associativity
  3. directionality
  4. none of these
Question 18 Multiple Choice (Single Answer)

_____ is used in compilers in passing an expression by recursion.

  1. Stack
  2. Queue
  3. Circular queue
  4. None of these
Question 19 Multiple Choice (Single Answer)

The output of the following code snippet is ________ ( )
Int iNum=2;
Switch(iNum)
{
case 1.5: printf(ONE AND HALF);
Break;
case 2: printf(TWO);
case 4: printf(FOUR);
}

  1. ONE AND HALF
  2. TWO
  3. FOUR
  4. error in code
Question 20 Multiple Choice (Single Answer)

The output of the following code snippet is ___________ ( )
main( )
{
int x=3,y,z;
y=x=10; z=x<10;
printf(n x=%d y=%d z=%d,x,y,z);
}

  1. 10 10 10
  2. 10 10 0
  3. 3 10 10
  4. error in code
Question 21 Multiple Choice (Single Answer)

The output of the following code snippet is __________ ( )
main( )
{
int b[]=
{
10,20,30,40,50
};
int i;
for(i=0; i<=4 ;i++)
Printf(n %d,*(b+i));
}

  1. 1 2 3 4 5
  2. 2000 2002 2004 2006 2008
  3. 10 20 30 40 50
  4. error in code
Question 22 Multiple Choice (Single Answer)

__________________ is a pointer to a structure operator.

  1. &
  2. *
  3. ->
  4. <-
Question 23 Multiple Choice (Single Answer)

The output of the following code snippet, when num is 11 is _______
If (num%2=0)
Printf(number is even);
Else
Printf(number is odd);

  1. number is even
  2. number is odd
  3. displays nothing
  4. error in code
Question 24 Multiple Choice (Single Answer)

______________ is the declararion of a pointer to an array.

  1. int *p[10]
  2. int (*p)[10]
  3. int *p
  4. none of these
Question 25 Multiple Choice (Single Answer)

The break statement in a nested loop results in ___________

  1. the control outside the loop stucture
  2. the control outside the innermost loop
  3. the control outside the program
  4. none of these