0

programming languages Online Quiz - 264

Description: programming languages Online Quiz - 264
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Which conversion is not possible?

  1. int to float

  2. float to int

  3. char to float

  4. All are possible


Correct Option: D
  1. Classes in class diagrams may be grouped into packages in order to illustrate the overall organization of a model

  2. In object diagrams, names of instances are in italics or all-caps

  3. If package B depends on package A, then any change in A will require a change in B

  4. Object diagrams and class diagrams are completely interchangeable


Correct Option: A

Advantage of using polymorphism in class diagrams is a reduction of

  1. methods in the associated classes

  2. subclasses needed to accomplish the same functionality

  3. case statements and conditionals

  4. coupling between classes in the system


Correct Option: C
  1. Components are not allowed in deployment diagrams

  2. A rounded rectangle, just like a state in a state diagram

  3. A 3-dimensional rectangular solid (like a box)

  4. A rectangle with tabs on its left side


Correct Option: D
  1. +public

  2. #protected

  3. !package

  4. -private


Correct Option: B
  1. Use cases cannot be traced to a goal

  2. Use cases can be traced to atleast one goal

  3. Use cases are always traceable to multiple goals

  4. Use cases are not object oriented


Correct Option: B,D

When creating Use cases,the mapping between external event and Goal can be N:1

  1. True

  2. False


Correct Option: A

A deployment diagram does not address a static view of a system

  1. True

  2. False


Correct Option: B
  1. Multiple Inheritance and Overloading

  2. Operator Overloading and Overriding

  3. Multiple Inheritance and Operator Overloading

  4. Pointers and Single Inheritance


Correct Option: C

Which of the below methods in Java is not used with threads

  1. wait()

  2. run()

  3. Sleep()

  4. begin()


Correct Option: D

What will be the output of the following program : #define Swap if (a != b) { \ temp=a; \ a = b; \ b = temp; \ //Swapping Done } void main() { int a=10,b=5,temp; Swap; printf("a=%d a=%d",a,b); }

  1. Compile-Time Error

  2. a=5 b=10

  3. a=10 b=5

  4. None of the above


Correct Option: A

What will be the output of the following program : void main() { int val=50; void ptr; ptr=&val; printf("%d %d",val,(int *)ptr); }C

  1. Compile-Time Error

  2. 50 50

  3. 50 0

  4. None of the above


Correct Option: B

What will be the output of the following program : void main() { int a=5,b=6; Printf("%d %d %d",a,b,--a*++b); }

  1. Compile-Time Error

  2. 5 6 30

  3. 4 7 28

  4. None of the above


Correct Option: C

What will be the output of the following program : void main() { int val=5; void ptr; *(int *)ptr=5; val=ptr; printf("%d %d",(int )val,(int *)ptr); }

  1. Compile-Time Error

  2. Unpredictable

  3. 5 5

  4. None of the above


Correct Option: C

What will be the output of the following program : void main() { int val=2; val = - --val- val--- --val; printf("%d",val); }

  1. Compile-Time Error

  2. 3

  3. -1

  4. 0


Correct Option: C

What will be the output of the following program : void main() { int i, n =10; for (i=1; i

  1. 84

  2. 840

  3. 852

  4. 864


Correct Option: C

What will be the output of the following program : void main() { printf("%f",123.); }

  1. 123

  2. Compile-Time Error

  3. 123.00

  4. 123.000000


Correct Option: D
- Hide questions