How can a '::' operator be used as unary operator?
Answer / subham chaudhary
The scope operator can be used to refer to members of the global namespace. Because the global namespace doesn’t have a name, the notation :: member-name refers to a member of the global namespace. This can be useful for referring to members of global namespace whose names have been hidden by names declared in nested local scope. Unless we specify to the compiler in which namespace to search for a declaration, the compiler simple searches the current scope, and any scopes in which the current scope is nested, to find the declaration for the name.
| Is This Answer Correct ? | 0 Yes | 0 No |
this is to swap to strings....but in output the whole strings are swapped leaving first as it is...why it is so #include<iostream.h> int main() { char a[]="ajeet"; char b[]="singh"; long x=*a; long y=*b; cout<<x<<":"<<y; x=x+y; y=x-y; x=x-y; *a=x; *b=y; cout<<x<<":"<<y; cout<<&a<<endl; cout<<&b<<endl; }
Where must the declaration of a friend function appear?
To what does “event-driven” refer?
Describe public access specifiers?
founder of c++
7 Answers Microtek, TCS, TeleCommand,
Which c++ operator cannot overload?
What are the comments in c++?
What is a c++ object?
What is the most common mistake on c++ and oo projects?
Is the declaration of a class its interface or its implementation?
What is iterator c++?
Give example of a pure virtual function in c++?