Write any small program that will compile in "C" but not
in "C++"
Answer Posted / karunesh
int GetNum()
{
printf("this will compile under c but not in c++");
}
you will get a error under g++ funtion should return int
while in c i will work with warning.
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
How do you establish a has-a relationship?
Write a function to find the nth item from the end of a linked list in a single pass.
Can member functions be private?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
What is the difference between *p++ and (*p)++ ?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What is a memory leak c++?
What are the operators in c++?
Explain public, protected, private in c++?
What is ctime c++?
Can I uninstall microsoft c++ redistributable?
What is format for defining a structure?
What is a map in c++?
How many static variables are created if you put one static member into a template class definition?
what is the difference between overloading & overriding? give example.