Identify the error in the following program.
#include<iostream.h>
void main()
{
int i = 0;
i = i + 1;
cout « i « " ";
/*comment *//i = i + 1;
cout << i;
}

Answer Posted / hr

/* comment*//i=i+1; -> Syntax error

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation and abstraction? How are they implemented in C++?

886


What is virtual methods?

919


How to generate random numbers in C++ with a range?

672


Is it possible to get the source code back from binary file?

1046


Write a program which uses functions like strcmp(), strcpy()? etc

876


What does h mean in maths?

885


What operator is used to access a struct through a pointer a) >> b) -> c) *

889


What is abstract class in oops?

804


What is the basic of c++?

832


What is a dangling pointer in c++?

880


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

1983


Is java as fast as c++?

834


Can you explain polymorphism?

859


Can recursive program be written in C++?

946


What are the restrictions apply to constructors and destructors?

872