Sunday, 31 August 2014

C++ program to print the default value of variable

C++ program to print the default value of an integer variable: A simple C++ program which print some values on output screen, which are already assigned into those variable.
C++ program to print the default value of  variable

C++ program to print the default value of an integer variable

#include <iostream.h>#include <conio.h> void main(){ clrscr(); int x = 10; float y = 10.1; char z = 'a'; cout << "x = " << x << endl; cout << "y = " << y << endl; cout << "z = " << z << endl; getch();}
OUTPUT: x = 10 y = 10.1 z = a