Which of the following keywords are used to control access to a class member? A) default
B) break
C) protected
D) goto

1 Answer

Answer :

C) protected

Related questions

Description : In Goto statement the place to which control is transferred is identified by a statement so a. Label b. Display c. Break d. None of these

Last Answer : a. Label

Description : The statement is used to transfer the control to the end of statement block in a loop. a. Continue b. Break c. Switch d. Goto

Last Answer : b. Break

Description : Some of the situations where inline expansion may not work are: A) For functions returning values, if a loop, a switch or goto exists. B) If functions contain static variables and they are re-cursive. C) For functions not returning values, if return statement exist. D) All of the above.

Last Answer : D) All of the above.

Description : State True or False. i) A satic function can have access to only other static members (functions or variables) declared in the same class. ii) A static member function can be called using the class name (instead of its objects) A) True, True B) True, False C) False, True D) False, False

Last Answer : B) True, False

Description : Which one of the following is correct, when a class grants friend status to another class? (A) The member functions of the class generating friendship can access the members of the friend class. (B) ... the friendship. (C) Class friendship is reciprocal to each other (D) There is no such concept.

Last Answer : All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship. 

Description : What is the default access specifier?

Last Answer : A: friendly

Description : Describe Jump statements: break, continue, and goto. 

Last Answer : Break terminates a loop or switch. Continue jumps to the next iteration of an enclosing iteration statement. Goto jumps to a labelled statement.

Description : State true of false. i) Public can only be assigned to class ii) Protected protects a statement iii) Protected method is never accessible outside the package iv) Friendly variable may be accessible outside class A) i- ... -false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : State true or false for Java Program. i) All class variables are instance variables ii) All protected methods are friendly methods A) i-false, ii-false B) i-false, ii-true

Last Answer : B) i-false, ii-true

Description : When the inheritance is private, the private methods in base class are.................. in the derived class (in C++). (A) inaccessible (B) accessible (C) protected (D) public

Last Answer : (A) inaccessible

Description : State true or false for Java Program. i) Data members of an interface are by default final ii) An abstract class has implementations of all methods defined inside it. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true

Last Answer : C) i-true, ii-false

Description : Which of the following is/are correct with reference to Abstract class and interface ? (a) A class can inherit only one Abstract class but may inherit several interfaces. (b) An Abstract class can provide complete and default ... true (C) Both (a) and (b) are true (D) Neither (a) nor (b) is true

Last Answer : Answer: C

Description : What is the difference between keywords and reserved words?

Last Answer : A: Keywords have a special meaning in a language, and are part of the syntax. Reserved words are words that cannot be used as identifiers (variables, functions, etc.), because they are reserved by the ... goto is a reserved word but not a keyword (as a consequence, you cannot use it at all)

Description : …………. Refer to the names of variables, functions, arrays, classes etc. created by the programmer. A) Keywords B) Identifiers C) Constraints D) Strings

Last Answer : B) Identifiers

Description : Which of the following is FALSE in C? A) Keywords can be used as variable names B) Variable names can contain a digit C) Variable names do not contain a blank space D) Capital letters can be used in variables

Last Answer : A) Keywords can be used as variable names

Description : The dereferencing operator ………….. is used to access a member when we use pointers to both the object and the member. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : A) ->*

Description : Some of the C++ operators cannot overloaded which are i) Member access operators (. And .*) ii) Conditional operator (? :) iii) Scope resolution operator (: :) iv) Size operator (sizeof) A) only i, ii and iii B) only ii, iii and iv C) only ii and iv D) All i, ii, iii and iv

Last Answer : D) All i, ii, iii and iv

Description : Describe use of protected access specifier used in the class.

Last Answer : Protected access specifier is use to declare a class member that is accessible by the member functions within its class and any class immediately derived from it.

Description : Which of the following is true about the static member variable in C++. i) It is initialized to zero when the first object of its class is created. Other initialization is also permitted. ii) It is visible only within ... , ii-True B) ii-False, ii-True C) i-True, ii-False D) i-False, iii-False

Last Answer : B) ii-False, ii-True

Description : State true of false. i) We cannot make the function inline by defining a function outside the class. ii) A member function can be called by using its name inside another member function of the same class, this ... of member function. A) True, True B) True, False C) False, True D) False, False

Last Answer : C) False, True

Description : Which of the following is not a member of class ? (A) Static function (B) Friend function (C) Const function (D) Virtual function

Last Answer : (B) Friend function

Description : Which of the following is used to make an Abstract class ? (A) Making atleast one member function as pure virtual function (B) Making atleast one member function as virtual function (C) Declaring as Abstract class using virtual keyword (D) Declaring as Abstract class using static keyword

Last Answer : (A) Making atleast one member function as pure virtual function

Description : Difference between Public, Private, Default and Protected ?

Last Answer : Ans. Private - Not accessible outside object scope. Public - Accessible from anywhere. Default - Accessible from anywhere within same package. Protected - Accessible from object and the sub class objects.

Description : Using which keyword we can access value of the instance variables and class variables of that class inside the method of that class itself. A) super B) final C) this D) either super or this

Last Answer : C) this

Description : If a function is friend of a class, which one of the following is wrong ? (A) A function can only be declared a friend by a class itself. (B) Friend functions are not members of a class, they are ... are members of a class. (D) It can have access to all members of the class, even private ones.

Last Answer : (C) Friend functions are members of a class.

Description : In Java, when we implement an interface method, it must be declared as: (A) Private (B) Protected (C) Public (D) Friend

Last Answer : (C) Public

Description : In ............. method, the word is written to the block in both the cache and main memory, in parallel. (A) Write through (B) Write back (C) Write protected (D) Direct mapping

Last Answer : (A) Write through 

Description : Which of the following do not represent legal flow control statements? A) break; B) return; C) exit(); D) continue outer;

Last Answer : C) exit();

Description : Which of the following do not represent legal flow control statements? A) break; B) return; C) exit(); D) continue outer;

Last Answer : C) exit();

Description : What is the default java package?

Last Answer : A: java.lang

Description : A constructor that accepts no parameters is called the ………………. A) Paramless constructor B) No parameter constructor C) Default constructor D) Argumentless constructor

Last Answer : C) Default constructor

Description : ……………….. contains information that defines valid values that are stored in a column or data type. A) View B) Rule C) Index D) Default

Last Answer : C) Index

Description : ............... joins are SQL server default A) Outer B) Inner C) Equi D) None of the above

Last Answer : B) Inner

Description : The default setting for a horizontal rule is .............. A) shaded B) unshaded C) both D) none of the above

Last Answer : A) shaded

Description : A packet whose destination is outside the local TCP/IP network segment is sent to .............. (1) File server (2) DNS server (3) DHCP server (4) Default gateway

Last Answer : Answer: 4 

Description : One aspect that has to be dealt with by the integrity subsystem is to ensure that only valid values can be assigned to each data items. This is referred to as A) Data Security B) Domain access C) Data Control

Last Answer : C) Data Control

Description : Data Integrity control uses ................ (A) Upper and lower limits on numeric data. (B) Passwords to prohibit unauthorised access to files. (C) Data dictionary to keep the data (D) Data dictionary to find last access of data

Last Answer : (B) Passwords to prohibit unauthorised access to files.

Description : Which of the following are the principles tasks of the linker? I. Resolve external references among separately compiled program units. II. Translate assembly language to machine code. III. Relocate code and data relative to the beginning of ... (A) I and II (B) I and III (C) II and III (D) I and IV

Last Answer : (B) I and III

Description : Are spheres natures goto storage shape?

Last Answer : answer:Of all the solids having a given volume, the sphere is the one with the smallest surface area; of all solids having a given surface area, the sphere is the one having the greatest volume. ... prisms and there would be wasted storage space if we tried to fit square boxes into round cars.

Description : What is the difference between continue statement and goto statement ?

Last Answer : continue statement The continue statement is used to repeat a statement or loop conditionally or unconditionally . You can only jump to the top using the continue statement. can't work without continue statement if, ... . The goto statement can work directly without if, else if, for, while etc.

Description : i need a shelter to goto for free i am homeless and jobless please help me.?

Last Answer : Contact the social services branch in your area and request emergency housing and living assistance. You will probably need to supply documents showing your low income status, but you are likely to qualify ... housing or a shelter. Local churches are often happy to help provide food and shelter too.

Description : Define what is the use of a goto statement?

Last Answer : The goto statement is also included in the C# language. This goto can be used to jump from inside a loop to outside. But jumping from outside to inside a loop is not allowed.

Description : Name the keywords which: (i) indicates that a method has no return type (ii) makes the variable as a class variable

Last Answer : Ans. (i)void (ii) static (static variables are also known as Class variables.)

Description : A roadstead: (A) Is a protected area of water where boats can move safely (B) Is the end of the road at the harbour (C) May be protected by break water walls (D) None of these

Last Answer : (A) Is a protected area of water where boats can move safely

Description : What is the purpose of Ctrl + I shortcut key in MS - Word: a) It converts selected text into the next larger size of the same font. b) It applies the Italic formatting to the selected text. c) It makes the selected text bold d) It adds a line break to the document. e) None of The Above

Last Answer : b) It applies the Italic formatting to the selected text.

Description : What is the difference between break and continue?

Last Answer : A: break keyword stops the complete loop and takes the control out of the loop, whereas, the continue keyword just stops the current iteration and takes the control to the next iteration.

Description : By using ................... you can force immediate termination of a loop, by passing the conditional expression and any remaining code in the body of the loop. A) Break B) Continue C) Terminate D) Loop Close

Last Answer : A) Break