recursion - Char list[2][10];...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Int main(int argc, char *argv[]) //argv – array if c-strings { //command line parameters cout<<”argc = “<<argc<<endl; for(int I =0; I<argc; I++) cout<<”argv[“<<I<<”]=”<<ergv[I]<<endl; return 0; } $./lab6.c James Tom argc=3 argv[0]=./lab6 argv[1]=James argv[2]=Tom Void swap(char s[], char t[]);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Char list[2][10]; Cin&gt;&gt;list[0]; Cin&gt;&gt;list[1]; Long fact(long n) { assert(n&gt;=0); if(n==0) return 1; else return n*fact(n-1); } void printVertical(int x) { int lastDigit=x%10; int frontFigits=x/10; if(frontDigits!=0) printVeritcal(frontDigits); cout&lt;&lt;LastDigit&lt;&lt;endl; }...
View Full Document

This note was uploaded on 04/17/2008 for the course ECE APS105 taught by Professor Maclean during the Spring '08 term at University of Toronto- Toronto.

Ask a homework question - tutors are online