class foo {
public:
static int func(const char*& p) const;
};

This is illegal, why?

Answer Posted / kalpana.y

this is illegal because

->here the class name is foo
->but,func is declared
->const is declared at outside

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the benefit of using #define to declare a constant?

611


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

670


In a switch statement, what will happen if a break statement is omitted?

607


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

2580


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1473






What is the correct code to have following output in c using nested for loop?

616


When should a far pointer be used?

607


What are the different types of C instructions?

682


provide an example of the Group by clause, when would you use this clause

1712


What does the c in ctime mean?

573


Write a program to print all permutations of a given string.

647


What is data type long in c?

627


What is New modifiers?

674


How will you declare an array of three function pointers where each function receives two ints and returns a float?

787


Do pointers take up memory?

666