c++ - How can i add a return statement to magicTime? -



c++ - How can i add a return statement to magicTime? -

i'm trying find output of next code. how can add together homecoming statement magictime? out set should a: 10 b: 30 c: a: 10 b: 30

#include <iostream> using namespace std; int magictime(int a, int &b, const int &c){ a=c; b=20; } int main(){ int = 10; int b = 30; int c; cout << "a: " << << " b " << b << " c " << c << endl; c=b; magictime(c, b, a); cout << "a: " << << " b " << b << " c " << c << endl; homecoming 0 ; }

ok want homecoming array of int

pseudo code

int[] magictime(int a, int &b, const int &c){ a=c; b=20; homecoming new int [] { a, b, c}; }

c++ nullpointerexception pass-by-reference pass-by-value

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -