Tuesday, 17 May 2016

C++ Multiple Choice Questions

C++ Multiple Choice Questions Set  1
21. Which of the following is true about const member functions?
a. const members can be invoked on both const as well as nonconst objects
b. const members can be invoked only on const objects and not on nonconst objects
c. nonconst members can be invoked on const objects as well as nonconst objects
d. none of the above

22. Which of the following relationship is known as inheritancerelationship?
a. ‘has-a’ relationship
b. ‘is-a’ relationship
c. association relationship
d. none of the above

23. If class A is friend of class B and if class B is friend of class C, which of the following is true?
a. Class C is friend of class A
b. Class A is friend of class C
c. Class A and Class C do not have any friend relationship
d. None of the above

24. A direct access file is:
a. A file in which recoreds are arranged in a way they are inserted in a file
b. A file in which records are arranged in a particular order
c. Files which are stored on a direct access storage medium
d. None of the above

25. Which of the following is not a component of file system
a. Access method
b. Auxiliary storage management
c. Free integrity mechanism
d. None of the above

26. Seek time is
a. time taken to retrieve a dta
b. Time taken by read/write head mechanism to position itself over appropriate cylinder
c. Time taken by appropriate sector to come under read/write
d. None of the above

27. ‘Prime area’ in context of file system is defined as
a. It is memory area created by operating system
b. It is an area into which data records are written
c. It is the main area of a web page
d. None of the above

28. In mulit-list organization
a. Records that have equivalent value for a given secondary index item are linked together to form a list.
b. Records are loaded in ordered sequence defined by collating sequence by content of the key
c. Records are directly accessed by record key field
d. None of the above

29. Which of the following is/are advantages of cellular partitioned structure:
a. Simultaneous read operations can be overlapped
b. Search time is reduced
c. Both a & b
d. None of the above

30. *ptr++ is equivalenet to:
a. ptr++
b. *ptr
c. ++*ptr
d. None of the above

31. The conditional compilation
a. It is taken care of by the compiler
b. It is setting the compiler option conditionally
c. It is compiling a program based on a condition
d. none of above

32. Originally ‘C’ was developed as:
a. System programming language
b. General purpose language
c. Data processing language
d. None of above

33. An inverted file
a. Locates information about data in small files that are maintained apart from actual data record
b. A file which stores opposite records
c. A file which stores information about records of a system
d. None of above

34. Which of the following is not a file operation:
a. Repositioning
b. Truncating
c. Appending
d. None of above

35. Latency time is:
a. Time taken by read/write head mechanism to position itself over appropriate cylinder
b. Time taken to transfer a dta from memory
c. Time taken by appropriate sector to come under read/write head
d. None of above

36. The two types of file structure existing in VSAM file are
a. Key sequenced structure, entry sequenced structure
b. Key sequence structure, exit sequenced structure
c. Entry sequence structure, exit sequenced structure
d. None of above

37. How many copies of a class static member are shared between objects of the class?
a. A copy of the static member is shared by all objects of a class
b. A copy is created only when at least one object is created from that class
c. A copy of the static member is created for each instntiation of the class
d. No memory is allocated for static members of a class

38. Which looping process checks the test condition at the end of the loop?
a. for
b. while
c. do-while
d. no looping process checks the test condition at the end

39. The default access level assigned to members of a class is ___________
a. Private
b. Public
c. Protected
d. Needs to be assigned
40. Which of the following correctly describes the meaning of‘namespace’ feature in C++?
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces refer to space between the names in a program
c. Namespaces refer to packing structure of classes in a program.
d. Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.

Correct Answers to C++ MCQ Questions
21 – b
22 – a
23 – b
24 – c
25 – c
26 – d
27 – b
28 – b
29 – a
30 – c
31 – d
32 – c
33 – b
34 – a
35 – d
36 – c
37 – c
38 – a
39 – c
40 – a


FoxPro 11 Mcqs


1. Which File is used to write the different types of Foxpro program ?  
A. Report File
B. Lable File
C. Program File
D. Index File
Ans: C

2.     If the Customers table is open, what does this command do: ? 

A.       Displays the value of the company field
B. Displays the characters ‘company’
C. Displays the value of the variable whose name is stored in the variable named ‘company’
Ans: B

3.     What happens if you hold the Shift key down then click on File in the main menu? 

A.       The Close option becomes Close All
B. The current window closes
C. The menu undocks and can be moved
Ans: A

4.     What date is given by Gomonth({^2000-01-31}, 1)? 

A February 28th 2000
B. February 29th 2000
C. March 2nd 2000
Ans: B

5.     What does the command 3+8 do if you are on the first record of the Customer table? |

A. Stores 11 in the primary key of the current record
B. Moves to record 11
C. Displays the numeric value 11.
Ans: B

6.     If x is ‘X ‘ and y is ‘Y ‘ then what is the result of x – y ? |

A type-mismatch error
A. -1
B. ‘XY ‘
Ans: B

7.     What happens if you redefine a field type from Numeric to Float?

A.       All values in the field are truncated to 4 decimal places
B. All values in the field are lost
C. Nothing changes
Ans: C

8.     Can you enter duplicate values in a field with a Unique index?

 

A. Yes
B. Yes, but you get a warning message
C. No, any duplicate value is rejected
Ans: A

9.  What does ?_screen->backcolor do?

A. Displays the value of the screen’s background colour.
B. Sets the background colour of the current control to the screen’s background.
C. Displays the colour-picker dialog
Ans: A

10. Can you use a #DEFINE on a Foxpro keyword?

A. Yes.
B. Yes but the redefinition is ignored.
C. No.
Ans: A

11. What is the result of Proper(‘MCKAY’)? 

A. ‘McKay’
B. ‘MCKAY’
C. ‘Mckay’
Ans: C


 

Monday, 16 May 2016

Visual Basic >NET Multiple Choice Q Set 5




Multiple Choice Questions

 1.       HTML stands for:
            a.)  Huge Makeup Language.
b.)  Huge Text Makeup Language.
c.)  Hypertext Makeup Language.
d.)  Hypertext Markup Language.
e.)  None of the above.

Answer:  d                                                                   Level: Easy

 2.       Which symbol is used to enclose HTML tags?
            a.)  ( )
b.)  < >
c.)  [ ]
d.) { }
e.)  None of the above.

Answer:  b                                                                   Level: Easy

 3.       Which symbol identifies an HTML end tag?
            a.)  !
b.)  |
c.)  /
d.)  \
e.)  ?

Answer:  c                                                                   Level: Moderate

 4.       Which HTML tag does not use an end tag?                                 
            a.)  B
b.)  center
c.)  HR
d.)  I
e.)  U

Answer:  c                                                                   Level: Moderate
 5.       Which statement is not true?
            a.)  An HTML document can be displayed in any internet browser.
b.)  HTML is used to change the formatting of the displayed text.
c.)  An HTML document is created with an HTML development editor.
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate

 6.       Which HTML tag creates a link to another browser page?
            a.)  A href
b.)  A ref
c.)  An href
d.)  An ref
e.)  href

Answer: a                                                                    Level: Hard

 7.       Which type of computer should host a web server?
            a.)  Apple
b.)  IBM
c.)  Sun
d.)  UNIX
e.)  Any type can host a web server.

Answer: e                                                                    Level: Easy

 8.       Where does a web application reside?
            a.)  Web client
b.)  Web server
c.)  Visual Studio .NET
d.)  Both a and b.
e.)  All of the above.

Answer:  b                                                                   Level: Moderate

 9.       Which is an example of a web document?
            a.)  Server script
b.)  Web page
c.)  Client browser
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Hard
10.       Which is an advantage of using a Web application to deliver an Information System solution?
            a.)  Most end users are familiar with using an internet browser.
b.)  Web applications are platform independent.
c.)  Upgrading the application is not very costly.
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Easy

11.       A postback occurs when:
            a.)  a browser posts a form to the server.
b.)  a user’s action activates the handing of a server event.
c.)  a server posts a form to the client.
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Moderate
12.       When does a “round trip” start in a web application?
            a.)  The server requests an action from the user.
b.)  The user activates a server control event.
c.)  The browser posts a form to the server.
d.)  The server processes a control event.
e.)  The server posts a new HTML page.

Answer: b                                                                    Level: Hard

13.       Which software can be used to create an HTML page?
            a.)  Notepad
b.)  Word
c.)  Visual Studio .NET
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate
14.       Which set of symbols are used to signify the presence of ASP.NET code?                                 
            a.)  <@
b.)  <#
c.)  <$
d.)  <%
e.)  <&

Answer: d                                                                    Level: Moderate
15.       Which is the file extension used for an ASP.NET file?
            a.)  asn
b.)  asp
c.)  aspn
d.)  aspx
e.)  asx

Answer:                                                                   Level: Easy

16.       When an ASP.NET file is placed on an IIS server and viewed through a browser, the resulting HTML page contains:
            a.)  all ASP.NET code.
b.)  as much ASP.NET code as is in the ASP.NET file.
c.)  a mix of ASP.NET and HTML code.
d.)  all HTML code.
e.)  None of the above.

Answer:  d                                                                   Level: Moderate

17.       What is the extension for a Visual Basic web form interface file?
            a.)  .asp
b.)  .aspx
c.)  .asp.vb
d.)  .aspx.vb
e.)  .asp.vb.net

Answer: b                                                                    Level: Easy
18.       What is the extension for a Visual Basic web form code file?
            a.)  .asp
b.)  .aspx
c.)  .asp.vb
d.)  .aspx.vb
e.)  .asp.vb.net

Answer:  d                                                                   Level: Easy
19.       Which user action will not generate a server-side event?                                
            a.)  Mouse Move
b.)  Text Change
c.)  Button Click
d.)  Both a and b.
e.)  All of the above.

Answer: a                                                                    Level: Moderate

20.       Because of the latency of a round-trip on the internet:
            a.)  the interface and code of a web form are stored in separate files.
b.)  only some user actions, such as button clicks, will generate events.
c.)  it is best to use server-side control.
d.)  web applications should be coded in Visual Basic.
e.)  None of the above.
Answer:  b                                                                   Level: Hard
Section: 12-4                                                               Page: 327

21.       Which property is used to name a web control?
            a.)  ControlName
b.)  Designation
c.)  ID
d.)  Name
e.)  Title

Answer: c                                                                    Level: Moderate
22.       Which language is used to create an ASP.NET code file?
            a.)  Visual Basic
b.)  C#
c.)  C++
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate
   
23.       It is best to use a web instead of a windows application when the application:
            a.)  has a thin front end (client).
b.)  needs to be available to the public.
c.)  must be platform-independent.
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate

24.       Which is not a fundamental service identified in a three-tier architecture?
            a.)  Association layer
b.)  Connection layer
c.)  Logical layer
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate

25.       Which layer is exemplified by a web server?
            a.)  Application
b.)  Association
c.)  Data
d.)  Logical
e.)  Presentation

Answer:                                                                   Level: Easy
26.       Which layer is exemplified by a fat client?
            a.)  Application
b.)  Association
c.)  Data
d.)  Logical
e.)  Presentation

Answer: e                                                                    Level: Moderate
27.       Which layer is exemplified by the use of ADO.NET?
            a.)  Application
b.)  Association
c.)  Data
d.)  Logical
e.)  Presentation

Answer:  c                                                                   Level: Moderate

28.       How will using a middle tier typically affect the number of connections to a database?
            a.)  Increase the number
b.)  Have no effect on the number
c.)  Decrease the number
d.)  It depends on the type of client.
e.)  It depends on the type of database.

Answer: c                                                                    Level: Hard

29.       An application layer:
            a.)  will contain business logic.
b.)  manage connections to the database.
c.)  can be distributed over many computers.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate

30.       A data layer is responsible for:
            a.)  retrieving information from a database.
b.)  updating information in a database.
c.)  deleting information in a database.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy

31.       What is the minimum number of computers in a three-tier architecture?
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  4 or more

Answer:  b                                                                   Level: Easy

32.       A server farm is:                                 
            a.)  an example of a distributed application.
b.)  makes it easy to add new computers if demand increases.
c.)  applies only to web servers.
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Moderate

33.       Which is a valid type of state management for the creation of web pages?
            a.)  Client side
b.)  Server side
c.)  Data side
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Easy
34.       The stateless HTTP protocol refers to web pages created:
            a.)  on a web server.
b.)  without information from a database.
c.)  without knowledge of previous web pages.
d.)  before a request from a client.
e.)  on a client machine.

Answer:  c                                                                   Level: Moderate
 35.       Client-side state management techniques are appropriate when using:
            a.)  sensitive information.
b.)  critical applications.
c.)  an intranet.
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate
36.       Where does the view state store information?
            a.)  HTML source
b.)  Text file
c.)  URL
d.)  Both a and b.
e.)  All of the above.

Answer: a                                                                    Level: Moderate

37.       Where does the query string store information?
            a.)  HTML source
b.)  Text file
c.)  URL
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate
38.       Where do cookies store information?
            a.)  HTML source
b.)  Text file
c.)  URL
d.)  Both a and b.
e.)  All of the above.

Answer: b                                                                    Level: Moderate
39.       Which client-side technique is specific to ASP.NET?
            a.)  Cookies
b.)  Query string
c.)  View state
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Hard
40.       Which client-side technique can be disabled by the end-user?
            a.)  Cookies
b.)  Query string
c.)  View state
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Moderate
41.       What symbol specifies the beginning of a query string?
            a.)  @
b.)  #
c.)  $
d.)  %
e.)  ?

Answer: e                                                                    Level: Easy
42.       What is the syntax for creating and using an application variable?                                
            a.)  Application.VariableName = Value
b.)  Application.VariableName = (Value)
c.)  Application(VariableName) = Value
d.)  Application(VariableName) = (Value)
e.)  Application(“VariableName”) = Value

Answer:  e                                                                   Level: Moderate

43.       Which server-side technique is available in ASP.NET?
            a.)  Application states
b.)  Session states
c.)  Database support
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Easy

44.       An Application variable is created:
            a.)  when the application is first placed on a web server.
b.)  when the web server is first started.
c.)  when the first client requests a URL resource.
d.)  every time a client requests a URL resource.
e.)  every time a new client interacts with the web application.

Answer: c                                                                    Level: Moderate

45.       A Session variable is created:
            a.)  when the application is first placed on a web server.
b.)  when the web server is first started.
c.)  when the first client requests a URL resource.
d.)  every time a client requests a URL resource.
e.)  every time a new client interacts with the web application.

Answer:  e                                                                   Level: Moderate

46.       If there is no activity from a browser, how long will a session variable last?
            a.)  10 minutes
b.)  20 minutes
c.)  60 minutes
d.)  100 minutes
e.)  200 minutes

Answer:  b                                                                   Level: Easy

47.       Which is not a reason for using a database to store state information?                                
            a.)  The capacity to store high volumes of information
b.)  The ability to use data mining techniques on the stored information
c.)  The ability to use application and session variables 
d.)  Security from unauthorized use
e.)  The power to easily query for specific information

Answer: c                                                                    Level: Hard

48.       Which control is an example of an object in VB.NET?
            a.)  Button
b.)  Label
c.)  Textbox
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy


49.       Which of the following is part of an object?
            a.)  Methods
b.)  Properties
c.)  Instances
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

50       Which is true about objects?
            a.)  Objects are used to create classes.
b.)  Objects are analogous to blueprints.
c.)  Objects combine actions and data.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Moderate



1.       Properties are used to represent:                                  
            a.)  actions.
b.)  classes.
c.)  data.
d.)  events.
e.)  instances.

Answer:  c                                                                   Level: Easy
2.       Methods are used to represent:                                  
            a.)  actions.
b.)  classes.
c.)  data.
d.)  events.
e.)  instances.

Answer: a                                                                    Level: Easy

3.       The term instantiation refers to the creation of:
            a.)  a class from a blueprint.
b.)  an object from a class.
c.)  a method from an object.
d.)  a property from a method.
e.)  a blueprint from a property.

Answer: b                                                                    Level: Moderate
4.       Anything in VB.NET that has a property or method is:
            a.)  a class.
b.)  a control.
c.)  an object.
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate
5.       Which feature is needed to make a programming language object oriented?
            a.)  Encapsulation
b.)  Inheritance
c.)  Polymorphism
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Easy
6.       We should think of the practice of object-oriented programming as:                                
            a.)  a simple answer to the complex problem of creating software.
b.)  an incremental improvement to the problem of creating software.
c.)  the way to get rid of a werewolf.
d.)  Both a and b.
e.)  All of the above.

Answer: b                                                                    Level: Moderate

7.       Encapsulation makes it easier to:
            a.)  reuse and modify existing modules of code.
b.)  write and read code by sharing method names.
c.)  hide and protect data from external code.
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate
8.       Inheritance makes it easier to:
            a.)  reuse and modify existing modules of code.
b.)  write and read code by sharing method names.
c.)  hide and protect data from external code.
d.)  Both a and b.
e.)  All of the above.

Answer: a                                                                    Level: Moderate

9.       Polymorphism makes it easier to:
            a.)  reuse and modify existing modules of code.
b.)  write and read code by sharing method names.
c.)  hide and protect data from external code.
d.)  Both a and b.
e.)  All of the above.

Answer: b                                                                    Level: Moderate

10.       The standard prefix to signify a class is:
            a.)  B.
b.)  C.
c.)  L.
d.)  S.
e.)  T.

Answer: e                                                                    Level: Moderate

11.       When using encapsulation how should data be shared with external code?                                 
            a.)  Events
b.)  Methods
c.)  Properties
d.)  Private variables
e.)  Public variables

Answer: c                                                                    Level: Moderate

12.       Which statement is true?
            a.)  A base class inherits some of the properties of a derived class.
b.)  A base class inherits all of the properties of a derived class.
c.)  A derived class inherits some of the properties of a base class.
d.)  A derived class inherits all of the properties of a base class.
e.)    None of the above.

Answer: d                                                                    Level: Moderate
13.       When a base class is changed:
            a.)  there is no effect on the derived class.
b.)  the derived class changes when the key word Overridden is used.
c.)  only the methods of the derived class change.
d.)  only the properties of the derived class change.
e.)  the derived class automatically changes.

Answer:  e                                                                   Level: Easy

14.       Polymorphism can apply to:
            a.)  math operators.
b.)  method names.
c.)  object names.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate
15.       With polymorphism:
            a.)  one method can have multiple names.
b.)  one object can have multiple names.
c.)  many methods can share the same name.
d.)  many objects can share the same name.
e.)  None of the above statements are true.

Answer:  c                                                                   Level: Hard

16.       Which element of a class is optional?                                
            a.)  Constructs
b.)  Fields
c.)  Methods
d.)  Properties
e.)  All of the above.

Answer: e                                                                    Level: Moderate

17.       What is the suggested order for the definition of class elements from first to last?
            a.)  Constructs, fields, methods, properties
b.)  Properties, constructs, fields, methods
c.)  Fields, properties, constructs, methods
d.)  Constructs, properties, fields, methods
e.)  Methods, constructs, properties, fields

Answer: c                                                                    Level: Hard

18       The standard for designing a field is that it be defined as a:
            a.)  private method.
b.)  public method.
c.)  private variable.
d.)  public variable.
e.)  None of the above.

Answer: c                                                                    Level: Moderate
19.       What is the syntax for making a property read-only?
            a.)  Property Read propertyname As datatype
b.)  Read Property propertyname As datatype
c.)  ReadOnly Property propertyname As datatype
d.)  Read-Only Property propertyname As datatype
e.)  RO Property propertyname As datatype

Answer: c                                                                    Level: Moderate
  

20.       The Get procedure of a property acts like:
            a.)  an event.
b.)  a function.
c.)  a variable.
d.)  Both a and b.
e.)  All of the above.

Answer: b                                                                    Level: Hard

21.       A method in a class is:                                
            a.)  a sub procedure.
b.)  a function.
c.)  an event.
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Moderate

22.       How many constructors can a class have?
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  All of the above.
 
Answer:  e                                                                   Level: Easy
23.       A constructor is a special type of:
            a.)  class.
b.)  field.
c.)  method.
d.)  property.
e.)  variable.
 
Answer:  c                                                                   Level: Easy
24.       Which is true for constructors in a class?
            a.)  All constructors must have the same number of parameters.
b.)  All constructors must be the same parameter data type.
c.)  Some constructors can have the same list of parameters.
d.)  Only two constructors in a class can have the same list of parameters.
e.)  No two constructors in a class can have the same list of parameters.
 
Answer: e                                                                    Level: Moderate

25.       Which statement will call a constructor of a base class?
            a.)  Base.New( )
b.)  BaseConstructor.New ( )
c.)  CallBase.New( )
d.)  Constructor.New ( )
e.)  MyBase.New( )
 
Answer: e                                                                    Level: Moderate
26.  What is the proper code to put data into the dataset called CustomerDataset using the CustomerDataAdapter object?
            a.)  CustomerDataset.Fill(CustomerDataAdapter)
b.)  CustomerDataAdapter.Fill(CustomerDataset)
c.)  CustomerDataset.Load(CustomerDataAdapter)
d.)  CustomerDataAdapter.Load(CustomerDataset)
e.)  None of the above.
 
Answer: b                                                                    Level: Moderate


27.       Which object contains the Position property of the current record in a dataset?
            a.)  BindingContext
b.)  BindingData
c.)  DataBinding
d.)  DataBound
e.)  DataContext
 
Answer:  a                                                                   Level: Moderate


28.       The first record in a dataset has a position property of:
            a.)  zero.
b.)  one.
c.)  any value defined by the programmer.
d.)  Both a and b.
e.)  All of the above.
 
Answer:  a                                                                   Level: Easy

29.       Which below is specified by the DataMember Property?
            a.)  Connection object
b.)  DataAdapter object
c.)  Database field
d.)  Database table
e.)  Dataset object
 
Answer: d                                                                    Level: Moderate

30.       Which below is specified by the DataSource Property?
            a.)  Connection object
b.)  DataAdapter object
c.)  Database field
d.)  Database table
e.)  Dataset object
 
Answer:  e                                                                   Level: Moderate

31.       Which is a property of the DataGrid control?
            a.)  DataMember
b.)  DataSource
c.)  DataQuery
d.)  Both a and b.
e.)  All of the above.
 
Answer:  d                                                                   Level: Easy