Beruflich Dokumente
Kultur Dokumente
Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
A) True, False
B) False, True
C) True, True
D) False, False
1 c
Which of the following is not the part of ADT description?
A) Data
B) Operations
If an expression contains double, int, float, long, then whole expression will
promoted into which of these data types?
a) long
b) int
c) double
d) float
8 c
What number would be shown on the screen after the following statements of
C are executed?
char ch;
int i;
ch = 'G';
i = ch-'A';
printf("%d", i);
A. 5
B. 6
C. 7
D. 8
E. 9
29 b
The structures data types that are built in Pascal are ________________
a) Arrays and records
b) Variant records
c) Sets and files
d) All of these
34 a
# include<iostream>
using namespace std;
int main()
{
float a=’a’;
cout<<a;
return 0;
}
a) a
b) 0.0
c) 97.0000000
37 d) syntax error c
# include<iostream>
using namespace std;
enum test
{
x=10,y,z,w
};
int main()
{
cout<<x<<” “<<y<<” “<<z<<” “<<w;
return 0;
}
a) 10 11 12 9
b) 10 11 12 13
c) Syntax error
d) 10 garbage garbage garbage
38 b
The type system in which the programming language contains the variables
that may belong to more than one type is called
_________________________
a) Monomorphic type system
b) Polymorphic type system
c) One variable with multiple data types is an impossible thing
43 d) None of these b
The type system in which the programming language contains the variables
that belong to one type is called _________________________
a) Monomorphic type system
b) Polymorphic type system
c) One variable with multiple data types is an impossible thing
44 d) None of these a
The code of statements that can cause abnormal termination of the program
should be written in ___________
a) Try block
b) Catch block
c) Catch all block
67 d) Finally block a)
What will happen when a program throws any other type of exception other
than specified?
a) Program will crash
b) Arise an error
c) Program will still execute
d) None of these
73 b)
What happens if several handlers match the type of the thrown object?
a) All handlers will be executed and the messages will be displayed
b) Program will crash
c) The first matching exception handler after the try block is executed
d) None of these
75 c)
Choose the correct statement
I. The catch must be placed immediately after try block T.
II. There must be only one catch handler for every try block
III. There can be multiple catch handler for a try block T.
IV. It can have multiple parameters
a) Only I
b) All of these
c) I and II
d) I and III
76 d)