Object-Oriented Programming and Windows Workflow Fundamentals

A comprehensive quiz covering OOP concepts, C++ memory management, C# programming, and Windows Workflow Foundation fundamentals

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

If a catch statement is written to catch exception objects of a base class type, it can also catch all _____ derived from that base class

  1. Exceptions for objects
  2. Objects of classes
  3. Arguments
  4. Errors
Question 2 Multiple Choice (Single Answer)

Association in UML can be represented by:

  1. Only with a double line between base class & derived classes
  2. A plane line with no shape on either end
  3. A line with an arrow-head pointing in direction of parent or superclass
  4. Diamond shape between classes
Question 3 Multiple Choice (Single Answer)

Suppose that the Test class does not have an overloaded assignment operator. What happens when an assignment a=b; is given for two Test objects a and b?

  1. The automatic assignment operator is used
  2. The copy constructor is used
  3. Compiler error
  4. Run-time error
Question 4 Multiple Choice (Single Answer)

Peer-to-peer relationship is a type of _________.

  1. Association
  2. Aggregation
  3. Link
  4. None of these options
Question 5 Multiple Choice (Single Answer)

Which of the following are good reasons to use an object oriented language.

  1. You can define your own data types
  2. An object oriented program can be taught to correct its own errors
  3. It is easier to conceptualize an object oriented program
  4. You can define your own data types and It is easier to conceptualize an object oriented program
Question 6 Multiple Choice (Single Answer)

What is the result of this code? myObj *foo = operator new(sizeof(foo));

  1. That's not legal syntax!
  2. foo has memory allocated for it, but is not constructed
  3. foo has memory allocated for it, and is fully constructed
  4. None of the above
Question 7 Multiple Choice (Single Answer)

What is wrong with the following code? int * x = (int *) malloc(100 * sizeof(int)); x = realloc(x, sizeof(int) * 200);

  1. If realloc fails, then the original memory is lost
  2. Nothing, realloc is guaranteed to succeed (by returning the original pointer)
  3. Nothing, realloc frees the original memory passed to it
  4. None of the above
Question 8 Multiple Choice (Single Answer)

An application uses encapsulation to achieve ________

  1. Information hiding
  2. Minimizing interdependencies among modules
  3. Make implementation independent
  4. All of these options
Question 9 Multiple Choice (Single Answer)

When a class uses dynamic memory, what member functions should be provided by the class?

  1. An overloaded assignment operator
  2. The copy constructor
  3. A destructor
  4. All of these options
Question 10 Multiple Choice (Single Answer)

Which are the main three features of OOP language?

  1. Data Encapsulation, Inheritance & Exception handling
  2. Inheritance, Polymorphism & Exception handling
  3. Data Encapsulation, Inheritance & Polymorphism
  4. Overloading, Inheritance & Polymorphism
Question 11 Multiple Choice (Single Answer)

Reusability can be achieved through?

  1. Inheritance
  2. Composition
  3. Association
  4. All of these options
Question 12 True/False

We can write any C# code on the code behind of workflow. True or false

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

How to pass data to a workflow

  1. using Bookmark resumption
  2. Using InArgument
  3. Using variables
  4. using bookmark resumption and using InArgument
  5. None of this
Question 14 Multiple Choice (Single Answer)

How to access an outargument in the designer

  1. using variable assigned to the OutArgument
  2. Using InArgument assigned to the OutArgument
  3. It is not possible
  4. None of the above
Question 15 Multiple Choice (Single Answer)

How to resume a bookmark

  1. workflowApplication.ResumeBookmark(bookmarkName, null)
  2. workflowApplication.ResumeBookmark(bookmarkName)
  3. workflowInvoker.ResumeBookmark(bookmarkName, null)
  4. workflowInvoker.ResumeBookmark(bookmarkName)
Question 16 Multiple Choice (Single Answer)

Which technologies are used in Activity designer

  1. WPF
  2. Windows
  3. Silverlight
  4. workflow
Question 17 Multiple Choice (Single Answer)

How to define a designer for an activity

  1. Add the Designer attribute to the Activity class
  2. Assign ActivityDesigner name in the Activity Constructor
  3. By overriding cacheMetadata
  4. None of the above
Question 18 True/False

Whether InOutarguments are supported in WF4.0

  1. True
  2. False
Question 19 True/False

Activitydesigner is a Xaml file with no code behind

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

Which method in custom activity contains the execution logic

  1. Exec
  2. Execute
  3. CacheMetadata
  4. beginExec