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>
               using namespace std;
               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;
               float main()
              {
                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.

9 Comments

  1. Sir yeh assiment soft form me submit krwani ta hard form me!??

    ReplyDelete
  2. https://docs.google.com/document/d/1MHKF4Vx-zbmhZIqqEqEdlTJpbeUguSh_xl2eUs2tyvc/edit?usp=sharing

    Sir this is my assignment you can check it out.

    ReplyDelete
  3. #include
    using namespace std;
    int main()
    {
    cout<<"syed zaheer abbas"<<endl;
    cout<<"syed jamil hussain"<<endl;
    cout<<"407205"<<endl;
    return 0;
    }

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. #include
    using namespace std;
    int main()
    {
    int a;
    cin>> a;
    cout<<"enter your age"<<endl;
    return 0;
    }

    ReplyDelete

  6. #include
    using namespace std;
    int main()
    {
    char a;
    cin>> a;
    cout<<"enter a character"<<endl;
    return 0;
    }

    ReplyDelete

Post a Comment

Previous Post Next Post