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.vustudents.ning.com

 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

# Assignment # 2 one third question has solved...

// 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();

}

## Latest Activity

Ma no, Tahir Ali, AHMAD RAZA and 9 more joined Virtual University of Pakistan
19 minutes ago
Tasha joined +M.Tariq Malik's group

### CS201 Introduction to Programming

35 minutes ago
princess and + cs619 joined +M.Tariq Malik's group

### CS614 Data Warehousing

53 minutes ago
1 hour ago
jamshaid joined +M.Tariq Malik's group

### PAK301 Pakistan Studies

1 hour ago
2 hours ago
Zohaib Ch joined +M.Tariq Malik's group

### HRM624 Conflict Management

2 hours ago
2 hours ago
Zohaib Ch updated their profile
2 hours ago
3 hours ago
3 hours ago
ADIL GHAFOOR and + cs619 joined +M.Tariq Malik's group

3 hours ago

## Today Top Members

1

2

3

4

5

### tasbi

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

.