JUNE 2013 - Paper 3

46:  
Match the following :
a. TTL                                 i. High component density
b. ECL                                ii. Low power consumption
c. MOS                               iii. Evolution of diode transistor logic
d. CMOS                            iv. High speed digital circuits
 
Codes 
a    b    c   d 
 
A.

iii    ii    i   iv

B.

i     iv     iii     ii 

C.

iii     iv       i       ii 

D.

i     ii      iii       iv

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



47:  

When an array is passed as a parameter to a function which of the following statements is correct ?

A.

The function can change values in the original array. 

B.

The function cannot change values in the original array. 

C.

 Results in compilation error.

D.

Results in runtime error

 
 

Option: A

Explanation :

In passing an array as a parameter to a function it is passed as a reference parameter. What is actually passed is the address of its first element. Since arrays are passed by reference this means that if the function changes the value of an element in an array that is a parameter of the function then the corresponding actual array of the call will have that element changed. example which returns the average value of the first n elements in a real array.
 
float meanarray(int n)       // IN no of elements      
float A[]      // IN array parameter  

// This function returns the average value of the first n elements in the array A which is assumed to have >= n elements.  
{  
float sum = 0.0;
   
// local variable 
sum   int i;            
  // local loop control      
for (i = 0; i < n; i++)    
sum += A[i];  
  return sum/n;  
}

 // end meanarray    
                                                   
 So, answer is 'A'.

Click on Discuss to view users comments.

Write your comments here:



48:  

Suppose you want  to delete the name that occurs before "Vivek" in an alphabetical listing. Which of the following data structures shall be most efficient for this operation ?

A.

Circular linked list 

B.

 Doubly linked list 

C.

Linked list 

D.

Dequeue

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

HARI BABU V said: (7:20pm on Wednesday 4th September 2013)
answer is D.dequeue .

Write your comments here:



49:  
What will be the output of the following segment of the program ?
 
main( )
{
char *s = "hello world" ;
inti = 7;
printf("%, *s", i, s);
 }
 
A.
Syntax error
B.
hello w
C.
hello
D.

o world

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



50:  
Trace the error :
 
void main( )
{
int *b, &a;
printf ( "%d, %d", a, *b)
}
A.
No error 
B.
Logical error
C.
Syntax error
D.

Semantic error

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here: