We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Looking For Something at Site? Search Below

// Yeh Full solution nai ha 2 parts ho gay hain last nai howa abe lecture 13 menay nai lia 

download the attach file and compile in your pc

#include <iostream>
#include <stdlib.h>
using namespace std;
void DisplayVUID();

void DisplayReverse(char[],int);
int main(){
DisplayVUID();
char VuidReverse[12] = {'B','C','1','2','0','4','0','3','4','5','6'};
DisplayReverse(VuidReverse,11);

// Dignol wala abe lecture 13 nai lia abe loo ga aur soba solution baqi post kr do yeh bilkol theak solution ha 
}
// Display Function
void DisplayVUID(){
char VUID[12] = "BC120403456";
cout "My VUID is: ";
for(int i=0; i<12; i++){
cout VUID[i];
}
}
// Reverse Function
void DisplayReverse(char* VuidReverse, int arraysize){
cout "\nMy VUID in reverse order: ";
for(int i = arraysize - 1; i>=0; i--){
cout VuidReverse[i];
}
}


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 511

Attachments:

Replies to This Discussion

#include <iostream>
#include <stdlib.h>
using namespace std;
void DisplayVUID();

void DisplayReverse(char[],int);
int main(){
DisplayVUID();
char VuidReverse[12] = {'B','C','1','2','0','4','0','3','4','5','6'};
DisplayReverse(VuidReverse,11);


}
// Ready Function
// Display Function
void DisplayVUID(){
char VUID[12] = "BC120403456";
cout "My VUID is: ";
for(int i=0; i<12; i++){
cout VUID[i];
}
}
// Reverse Function
void DisplayReverse(char* VuidReverse, int arraysize){
cout "\nMy VUID in reverse order: ";
for(int i = arraysize - 1; i>=0; i--){
cout VuidReverse[i];
}
}

Please change MC123456789 with your VU ID everywhere.

#include <iostream.h>
#include <conio.h>

void DisplayVUID(){
     char myID[12]={"MC123456789"};
     cout "My VUID is: " myID endl;
}

void DisplayReverse(char myID[12]){
     cout "My VUID in reverse order: " ;
     for(int i = 11; i>=0 ; i--){
             cout myID[i];
     }
     cout endl endl;
}

void  StoreDiagonal(){
      int  matrix[9][9]={0};
      
      matrix[0][0]=1;
      matrix[1][1]=2;
      matrix[2][2]=3;
      matrix[3][3]=4;
      matrix[4][4]=5;
      matrix[5][5]=6;
      matrix[6][6]=7;
      matrix[7][7]=8;
      matrix[8][8]=9;
   
      for(int k=0; k<9; k++){
               for (int i=0; i<9; i++){
                   cout " " matrix[k][i];
               }
               cout endl;
       }
   
      
      
      
}


main(){
       DisplayVUID();
       DisplayReverse("MC123456789");
       StoreDiagonal();
       getch();


}



Read more: CS-201 2nd Assignment Solution - Virtual University of Pakistan http://vustudents.ning.com/group/cs201introductiontoprogramming/for...

RSS

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.