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

This is illegal, why?

Answer Posted / revathy

static functions can access static data only
Thus this is illegal

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what will be maximum number of comparisons when number of elements are given?

1410


What are register variables? What are the advantage of using register variables?

687


Explain how do you generate random numbers in c?

626


Explain high-order bytes.

676


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

657






What is array of structure in c programming?

753


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2236


What are data types in c language?

586


Is this program statement valid? INT = 10.50;

686


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

583


What is the basic structure of c?

557


What is storage class?

654


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1620


code for replace tabs with equivalent number of blanks

1640


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

623