class foo {
public:
static int func(const char*& p) const;
};
This is illegal, why?
Answer Posted / john gummadi
"const" cannot be used along with reference. And the function itself is const which means it cannot change any parameters. So no place for the reference here. If you really need reference, then get id of consts.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
code for quick sort?
What does sizeof return c?
Why c is known as a mother language?
What is clrscr ()?
write a program to find out prime number using sieve case?
Explain null pointer.
What is difference between scanf and gets?
Explain how do you declare an array that will hold more than 64kb of data?
Why flag is used in c?
Why shouldn’t I start variable names with underscores?
Explain what is a 'locale'?
Should a function contain a return statement if it does not return a value?
Describe the steps to insert data into a singly linked list.
Differentiate Source Codes from Object Codes
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)