Skip to main content

PDF TEST

Write a CPP program which explains use of Scope Resolution Operator...

Output Shown Below The Code!


  1. #include<iostream>  
  2. using namespace std;  
  3. //Global Variables 
  4. int x=10;  
  5. main ()  
  6. {  
  7. //Local Variables
  8. int x=20;  

  9. // printing the value of the local variables  
  10. cout<<"The value of the local x: "<<x;  
  11.   
  12. /**using scope resolution operator (::)
  13. to access the global variables**/   
  14. cout<<"\nThe value of the global variable x: "<<::x;   

  15. return 0;  
  16. }  

Output:


Comments

Popular posts from this blog

Introduction to basic parts of computer(Processor, Motherboard, RAM, Floppy Drive, CD/DVD Drive, Hard disk, Monitor, Keyboard, Mouse, SMPS, Printer, Scanner Etc.)

POST-3 Introduction to basic parts of computer(Processor, Motherboard, RAM, Floppy Drive, CD/DVD Drive, Hard disk, Monitor, Keyboard, Mouse, SMPS, Printer, Scanner Etc.) Processor: The Processor is an integrated electronic circuit that performs the tasks that run a computer. A processor performs arithmetical, logical, input/output (I/O) and other basic instructions that are passed from an operating system(OS). Most other processes are dependent on the operation of the processor. Each processor is constituted of one or more individual processing units called "cores". Each core processes instructions from single computing task at a certain speed, defined as 'clock speed' and measured in gigahertz (GHz). Increasing clock speed beyond certain point is so difficult and because of this modern computers nowadays have several cores(dual-core, quad-core, octa-core etc.). They work together to process instructions and complete multiple tasks at the same time. Motherboard: Mothe...

Write a CPP program to swap two integer numbers with the use of reference variable...

 POST -  All the code given below is compiled using turbo CPP and working totally fine but if you are using any new IDE there might be some difference in code... #include<iostream.h> #include<conio.h> void swap (int &x , int &y) {      int temp;     temp=x;     x=y;     y=temp; } main() {      int a, b;      clrscr();      cout<<"Enter The Value Of A : ";      cin>>a;      cout<<"Enter The Value Of B : ";      cin>>b;      swap(a,b);      cout<<"After Swapping..."<<endl;      cout<<"A= "<<a<<endl;      cout<<"B= "<<b<<endl;      getch();      return(0); }  OUTPUT:

How to create PLAY & PAUSE(STOP) buttons in Macromedia Flash 8...

POST - 2 How to create PLAY & PAUSE(STOP) buttons in Macromedia Flash 8 Step-1 Open Macromedia Flash 8 and create New Flash Document. Step-2 Draw an Oval by clicking Oval in tools section. Step-3 Now in Layer-1 right click on Frame No. 60 and select Insert Keyframe. Step-4 Select(with selection tool in tools section) and drag Oval(Object) to your last position.(Where you want to end motion effect) Step-5 Now right click on Frame No. 30 and select Create Motion Tween. Step-6 Now add new layer(By right clicking on existing layer and choosing Insert Layer) and draw two buttons using rectangle tool in tools section.(Make sure to make both these buttons of different colours. You can select colour before drawing from tools section) Step-7 Now right click on button and select Convert to symbol...Give proper name to button and make sure to select Type as Button.(Do this for both buttons. Names must be different) Step-8 (Optional) You can add text on your buttons from tools section... Step-...