Different data types in C Example program

Different data types in C Example program



Different data types in C++ - Example program
http://csadventures.blogspot.com/

Write a C++ program in which declare different data types including int, double and char. initialize values to all variables and print values as output.


See snapshot of above program below
 

In this program different data types used in C++ are declared and initialized.

CODE:

#include<iostream.h>
#include<conio.h>
main(){
     int roll, marks;
     double avg;
     char grade, name[20]="Kashif Nadeem";
clrscr();

roll=1204;
marks=714;
avg=84.6;
grade=A;

cout<<"-----------------------------------"<<endl;
cout<<"Student roll No. : "<<roll<<endl;
cout<<"Student Name     : "<<name<<endl;
cout<<"Student Marks    : "<<marks<<endl;
cout<<"Student average  : "<<avg<<endl;
cout<<"Student Grade    : "<<grade<<endl;
cout<<"----------------------------------"<<endl;
}

Thanks for visiting Different data types in C++ - Example program

Download
more from: CS Adventures


visit link download

Comments

Popular posts from this blog

Download Samsung Music versi 16 1 63 24 Android M Full Apk

Download Mobile Legends 1 1 22 108 1 APK for Android