- Which
     of the following involves context switch,
 (a) system call (b) privileged instruction
 (c) floating point exception (d) all the above
 
 
- In
     OST, terminal emulation is done in
 (a) sessions layer (b) application layer
 (c) presentation layer (d) transport layer
- For 1
     MB memory, the number of address lines required,
 (a)11 (b)16 (c)22 (d) 24
- Semaphore
     is used for
 (a) synchronization (b) dead-lock avoidence
 (c) box (d) none
- Piggy
     backing is a technique for
 a) Flow control b) Sequence
 c) Acknowledgement d) retransmission
- What
     is the sizeof(long int)
 (a) 4 bytes (b) 2 bytes (c) compiler dependent (d) 8 bytes
- Which
     of the function operator cannot be over loaded
 (a) <= (b) ?: (c) == (d) *
- In a
     class composed of x girls and y boys what part of the class is composed of
     girls
 (a). y/(x + y) (b). x/xy (c). x/(x + y) (d). y/xy
- If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?
(a).-5       (b). 4     (c). 2     (d). 8  
-   What would be the output of the
     following program?
 #include<stdio.h>
 main()
 {
 extern int a;
 printf("%d",a);;
 }
 int a=20;
 (a) 20 (b) 0 (c) garbage value (d) error!!
-   What would be the output of the
     following program?
 main()
 {
 inti=-3,j=2,k=0,m;
 m=++i&&++j||++k;
 printf("%d %d %d %d",i,j,k,m);
 }
 (a) -2 3 0 1 (b) -3 2 0 1 (c) -2 3 1 1 (d) error
- What would be the output of the following program?
#include<stdio.h>
             main()
 {
                         int i=-3,j=2,k=0,m;
 
                      m=++i&++j|++k;
 
                      printf("%d %d %d %d",i,j,k,m);
 } 
            Output:-2  3 
1  3         
- What would be the output of the following program.
#include<stdio.h>
#define CUBE(x)
(x*x*x)
 main()
{
  int a,b=3;
 a=CUBE(b++);
 printf("%d %d",a,b);
 }
a) 64    4  
 (b) 27    4              (c)
27    6        (d) 64  
 6
- What would be the output of the following program.
#include<stdio.h>
main()
{
            int
num,*p;
            num=5;
            p=#
            printf("%d",*p++);
}
(a) 6        
    (b) 5            
    (c) junk value            
 (d) compilation error
- What would be the output of the following program.
#include<stdio.h>
fn(int i)
{ return ++i;
}
main()
{
                         int i=10;
                        fn(i);
                        printf("%d",i);
}
(a) 10    
        (b) 11            
   (c)12         (d) Compilation error
- What would be the output of the following program?
main()
{
int i,j;
i=10;
j=sizeof(++i);
printf("%d",i);
}
{
int i,j;
i=10;
j=sizeof(++i);
printf("%d",i);
}
(a) 11        
 (b) 10              
  (c)4                (d)
compilation error
- What would be the output of the following program?
#include<stdio.h>
main()
{
                        int i=7;
                        printf("%d",i++*i++);
}
(a) 49        
        (b) 56        
      (c)72             (d)
compilation error
- What is the output of the program given below?
#include<stdio.h>
main()
{
            char
i=0;
            for(;i>=0;i++);
            printf("%d
",i);
} 
            Output:
-128 (The output vary from compiler to compiler)
- What is the output of the program given below?
#include <stdio.h>
main()
{
 
float f1 = 0.1;
 
if (f1 == 0.1f)
 
printf("equal\n");
 
else
 
printf("not equal\n");
}
            Output:
equal
- What is the output of the program given below?
#include <stdio.h>
 main()
 {
            float
x = 'a';
            printf("%f",
x);
            return
0;
 }
            Output:
97.000000
 
No comments:
Post a Comment