Answer Posted / vikram
scope resolution operator(::) is used to define member
functions outside the class,that is we are defining the
member functions explicitly.
Scope resolution operator is also used to access the
globally declared variables.
for example,
#include<iostream.h>
int a=20;
main()
{
int a=10;
cout<<a<<endl<<::a;
}
here,the output will be:
10
20
thnx
| Is This Answer Correct ? | 38 Yes | 6 No |
Post New Answer View All Answers
What is stream in oop?
Can we define a class within the interface?
What is the point of oop?
What is purpose of inheritance?
What is the difference between abstraction and polymorphism?
What is multilevel inheritance explain with example?
Why is oop useful?
How to hide the base class functionality in Inheritance?
What language is oop?
What is the real life example of polymorphism?
Is enum a class?
Why do we use oops?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
When not to use object oriented programming?
Give two or more real cenario of virtual function and vertual object