Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Identify if any error in the following code segment

  Shared By: Idelia Miller    Date: Jan 04    Category: C++ Programming    Views: 1909

Answer:

1. class example
2. {
3. float x;
4. public:
5. void example();
6. example(int, float);
7. };

Options

a) Line 7 should not include the semicolon
b) Line 6 is an incorrect statement
c) Line 5 cannot include void
d) No error

Answer : c) Line 5 cannot include void

Share: 
 

Didn't find what you were looking for? Find more on Identify if any error in the following code segment Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: