Thursday, 24 May 2018

CS201 Assignment no 2 Solution 2018

/*
Regrads,
Muhammad Hamza Baig
Biggnerstart.blogspot.com
 */

#include <iostream>
using namespace std;

void computeUserLevel (char *) ;

int main()
{
    cout<<"\t\tProgram To Predict User Programming Level"<<endl;
char Y [4];
for (int k=0; k<=0; k++)
{
cout<<"Q: Switch is a loop?\nA: ";
cin>> Y[0];
cout<<"Q: Pointers store memory addresses?\nA: ";
cin>> Y[1];
cout<<"Q: Semicolon after for loop is an error?\nA: ";
cin>>Y[2];
}
computeUserLevel(Y);
return 0;
}
void computeUserLevel (char *ptr)
{
if (*ptr == 'f' && *(ptr+1) == 't' && *(ptr+2) == 'f')
{
cout<<"Your level is advanced";
}
else if (*ptr == 'f' && *(ptr+1) == 't' && *(ptr+2) == 't')
{
cout<<"Your level is Intermediate";
}
else
cout<< "Your level is Beginner"<<endl;
system ("PAUSE");
}

6 comments:

  1. First run this program by yourself and then post it.Its give a big error like error of the father.try it

    ReplyDelete
  2. First run this program by yourself and then post it.It give an error like error of the father.try it.

    ReplyDelete
  3. First run this program by yourself and then post it.It gives an error like error of the father.try it.

    ReplyDelete
  4. First run this program by yourself and then post it.It gives an error like error of the father.try it.

    ReplyDelete
  5. Mr. Zeeshan i respect for your opinion but please execute by yourself properly than make a comment here for further detail.

    ReplyDelete
  6. if you didn't get code understanding why would you not clarify your concepts or ask about what the problem everyone is executing this code than ping me for further detail.

    ReplyDelete

Featured Post

All Answers of Quiz regarding to this course on Fiverr "Online Freelancing Essentials: Be A Successful Fiverr Seller"

To Clear All quiz of mentioned Course you can have a look on or check questions answers as well. Course name:  Online Freelancing Essentials...

Popular Posts