Programming Fundamentals
Cin/Cout functions
Example Questions
Q1. write a program in C++ to print your name, father name, and CMS number on the console using Visual Studio only.
Q2. write a program in C++ to take age from the user and print age on the console screen.
Q3. write a program in C++ to take a character from the user and print it on the console screen.
Q4. State the output/errors of the given Code:
- #include<iostream>
float main()
{
int a=10,b=20,c=0;
c=a;
a=b;
b=c;
cout<<a <<" " <<b <<" "<<c<<endl;
}
- #include<iostream> using namespace std;
{
int a=10;
cout<<a <<" " <<b <<" "<<c<<endl;
}
Q5. write a program to print all your courses names on the console screen.
For Help link is provided:
Click for access
Note: show .ccp file and output to me for the marks all students who failed to do so will lose lab marks. if found cheating or copy will get zero.
Sir yeh assiment soft form me submit krwani ta hard form me!??
ReplyDeleteany form you like but it should be working :)
DeleteOk sir
ReplyDeletehttps://docs.google.com/document/d/1MHKF4Vx-zbmhZIqqEqEdlTJpbeUguSh_xl2eUs2tyvc/edit?usp=sharing
ReplyDeleteSir this is my assignment you can check it out.
very nice work
Delete#include
ReplyDeleteusing namespace std;
int main()
{
cout<<"syed zaheer abbas"<<endl;
cout<<"syed jamil hussain"<<endl;
cout<<"407205"<<endl;
return 0;
}
This comment has been removed by the author.
ReplyDelete#include
ReplyDeleteusing namespace std;
int main()
{
int a;
cin>> a;
cout<<"enter your age"<<endl;
return 0;
}
ReplyDelete#include
using namespace std;
int main()
{
char a;
cin>> a;
cout<<"enter a character"<<endl;
return 0;
}
Post a Comment