Documente Academic
Documente Profesional
Documente Cultură
1. void main()
{
char *s="\12345s\n";
printf("%d",sizeof(s));
}
The output of the program
a. 5
b. 6
c. 7
d. 8
2. main()
{
extern i;
printf("%d\n",i);
{
int i=20;
printf("%d\n",i);
}
}
a. Compiler Errorb. 0, 20
c. Linker Error
3. main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
a. 57, 92
b. 55, 92
c. 57, 94
d. None
d. None
4. main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}
a. RunTime Error. Access Violation
c. Cannot be determined
5. main()
{
int i = 0xff ;
printf("n%d", i<<2);
}
a. 4
b. 512
c. 1020
d. 1024
6. #define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}
a. 1
b. 225
c. 15
7. main()
{
int i, j, *p;
i = 25;
j = 100;
p = &i; // Address of i is assigned to pointer p
printf("%f", i/(*p) ); // i is divided by pointer p
}
a. Runtime Error
b. 1.00000
c. Compile Error
d. 0.00000
8. main()
{
char * strA;
char * strB = I am OK;
memcpy( strA, strB, 6);
}
a. Runtime Error
c. Compile Error
d. I am O
c. printf(%%)
d. printf(%%)
10. main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcat(a,b));
}
a. Hello
b. Hello World
c. Hello World
{
printf("Ok it works");
}
void func2(int a[][10])
{
printf("Will this work?");
}
b. I am OK
main()
{
int a[10][10];
func1(a);
func2(a);
}
a. Ok it works
c. Ok it worksWill his work?
12. main()
{
int c = 5;
printf("%d", main||c);
}
a. 1
b. 0
{
int x = 10;
printf ("x = %d, y = %d", x,--x++);
}
a. 10, 10
above
b. 10, 9
c. 10, 11
d. None of the
C++
14. The number of instances for a Static Member Variable is
a. a) Equal to number of objects created b. 1
c. 0
d. None
15. A C++ class can have
a. Virtual Constructor
b. Virtual Destructor
c. Virtual Constructor and Destructor
d. None
16. A class that is used to traverse through the objects maintained by a
container class.
a. Iterator class
b. STL
c. Vector class
d. None
17. void main()
{
int a, *pa, &ra;
pa = &a;
ra = a;
cout <<"a="<<a <<"*pa="<<*pa <<"ra"<<ra ;
}
c. No errors d. None
21. class A {
public:
// Line 1
int a=10;
// Line 2
float b;
// Line 3
double c;
// Line 4
void fun() { return b;}// Line 5
};
// Line 6
void main()
// Line 7
{
// Line 8
A a1;
// Line 9
a1.b=10;
// Line 10
cout << a1.fun();
// Line 11
}
// Line 12
a. Output is 10
b. Error at Line 9
22. class A
{
int a;
float b;
double c;
public:
d. None
d. None
23. When a language has the capability to produce new data type, it is called
a. Extensible b. Overloaded
c. Encapsulated
d.
Reprehensible
24. If Base Class, B is derived by Class D1 & D2, the constructor will be
called
a. B -> D1, B -> D2 b. B -> D1 -> D2 c. D2 -> D1 -> B
d. None of the above
25. A class that has no functionality of its own
a. Friend class b. Wrapper class c. Concrete class
above
d. None of the
26. class A
{
int a;
// Line 1
int b;
// Line 2
public:
// Line 3
void fun(int a,int b){ // Line 4
return a+b;
// Line 5
};
// Line 6
void main()
// Line 7
{
// Line 8
A a1;
// Line 9
cout << a1.fun(10,11);
// Line 10
}
a. Output is 21 b. Error at Line 9 c. Error at Line 4 d. Error at Line 8
Operating Systems
27. Which of the below version is a Multitasking OS?
a. Win 95 b. Win 98
c. Win NT d. Win ME
36. The signal bandwidth for the communications channel needed depends
on the
________, not on the ___________.
a. Symbol rate, bit rate b. Bit rate, symbol rate.
c. Bit rate, baud rate
d. Baud rate, symbol rate
37. WCDMA stands for
a. WideBand Code Division Multiplexing Access
b. Wide Code Division Mutliple Access.
c. Wideband Code Division Multiple Access
d. None of the above.
38. Digital cable television uses
a. BPSK b. AM
c. FM
d. QAM
a. RFC
b. IETF
c. DNS
d. PPP
d. HTTP.
43. Which of the following approaches to switching share network resources?
a. Circuit switching.
b. Packet Switching
c. Both
d. None of the above.
44. All web servers use port 80 to listen for client requests.
a. True b. False
45. Which of the following helps improve the performance of DNS?
a. Its distributed nature. b. Iterated requests. c. Caching. D. All the above
c. FILO
d. none of these
c. CDROM
d. none of
c. none