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
Why ca not I do something like this?
What does emoji p mean?
c program for searching a student details among 10 student details
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What are predefined functions in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What is the difference between c &c++?
What is const and volatile in c?
Can one function call another?
What does the file stdio.h contain?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What are the properties of union in c?
What is the purpose of macro in C language?
What is the difference between union and structure in c?
What is the difference between strcpy() and memcpy() function in c programming?