We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

a very simple program and easy to understand that how to  Use array in function. reverse function will reverse the array 

#include<iostream.h>
const int row =3;

int read(int a[row]);
int display(int a[row]);
int reverse(int a[row]);

main(){
int a[row];
cout"User Input\n";
read(a);
cout"\nSame Values"endl;
display(a);

cout"\nRevered array\n";
reverse(a);
coutendl;
system("pause");
}
int read(int a[row]){
int i;

for(i=0; i<3; i++){
cout"\nEnter Number :";
cin>>a[i];

}

}
int display(int a[row]){
int i;
for(i=0; i<3; i++){
cout"\nNumber :"a[i][0];

}


}
int reverse(int a[row]){
int i;
for(i=3-1; i>=0; i--){
cout"\nRevered :"a[i];


}

}

if the given code doesn't work then download the .cpp file given below

Badshah

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 307

.

+ 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)

Attachments:

Replies to This Discussion

is code mn eight errors hn ,,plz chk it 

cout undeclared 

endl undeclared 

kia in sb ko main s phly declare krna ho ga???kesy?

 hifzah jab ning py code share kia jata hy to cout or cin k less then or greater then primary expression remove ho jaty hen wo lagao then execute ho ga or agr profect code chahiye to file b attach hy wo download kro  

and this is my humble request to Sir M.Tariq Malik that please fix this issue from new threads 

ni badsha m n jo file attach h us mn s hi kh rhi hn k errors hn 

plz chk again 

fixed  now check kren 

Attachments:

 abi b hn

hifzah bcz there iz no value wch functionz wll return.

hifzah  use return i; in all functionz. 

I correctd errorz;

Now check it;

#include<iostream>
using namespace std;
// badshah.hazor@gmail.com

const int row =3; // global variable
// declaration of function
int read(int a[row]);
int display(int a[row]);
int reverse(int a[row]);

int main(){
cout"\t\t***Badshah***\n\n";
int a[row];
cout"User Input\n";
read(a); // calling to a function
cout"\nSame Values"endl;
display(a);

cout"\nRevered array\n";
reverse(a);
coutendl;
system("pause");
}
// definations of functions
int read(int a[row]){
int i;

for(i=0; i<3; i++){
cout"\nEnter Number :";
cin>>a[i];

}
return i;

}
int display(int a[row]){
int i;
for(i=0; i<3; i++){
cout"\nNumber :"a[i];

}

return i;
}
int reverse(int a[row]){
int i;
for(i=3-1; i>=0; i--){
cout"\nRevered :"a[i];


}
return i;
}

Attachments:

an excellent girl you are

output;

ap ny kon c file attach ki hy yaha pr to show nai ho rahi again attach kro

RSS

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

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

.