CS201 Assignment # 2 one third question has solved Shared by Ali Raza

No Comments

// 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];
}
}
Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment