Write any small program that will compile in "C" but not
in "C++"
Answer Posted / murali
hi(){ }
g++ -x c++ -c test1.cpp
test1.cpp:1: ISO C++ forbids declaration of `hi' with no
type
gcc -x c -c test1.cpp
Here the default return type is int.
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
How does work in c++?
How many types of classes are there in c++?
List the issue that the auto_ptr object handles?
What is this pointer in c++?
Why is c++ is better than c?
Explain what is oop?
What is the use of seekg in c++?
Can we delete this pointer in c++?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
What is the use of main function in c++?
Can we specify variable field width in a scanf() format string? If possible how?
What is an overflow error?
can any one help to find a specific string between html tags
which is changed to a sting..
weather.html looks (for location) is
What is isdigit c++? int age=35;
if(age>80)
{Console.WriteLine("Boy you are old");}
else
{Console.WrieLine("That is a good age");}