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
Describe private, protected and public – the differences and give examples.
What is meant by entry controlled loop?
When does a name clash occur in c++?
what is C++ objects?
Does c++ have finally?
How a new element can be added or pushed in a stack?
Which field is used in c++?
How would you use the functions memcpy(), memset(), memmove()?
What is a stack? How it can be implemented?
What type of question are asked in GE code writing test based on c++ data structures and pointers?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
How to implement is-a and has-a class relationships?
What are pointer-to-members? Explain.
What is the best free c++ compiler for windows?
Write a function to find the nth item from the end of a linked list in a single pass.