Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   . Know how to do these, to trace functions like these and to debug functions like the (http://www.go4expert.com/forums/trace-functions-debug-functions-t29252/)

fmmctg0001 4Nov2012 00:36

. Know how to do these, to trace functions like these and to debug functions like the
 
please somebody can help to debugging this

Code:

// recursive power , compute xn
int exp(int x, int n){
if(n==_______)
return _________;
return ____________*exp(_________);
}
void main(){
int a,b;
cin >>a>>b;
cout<<endl<<exp(a,b)<<endl;
}
// recursive print of a string
void print(char* s){
if(*s==____________)
return;
cout<<*s;
print(______________);
}
void main(){
char a[6]="hello";
print(a);
}
// recursive reverse print of a string
void rev_print(char* s){
if(*s==____________)
return;
____________________________;
___________________________;
}
void main(){
char a[100];
cin>>a;
rev_print(a);
}6
// recursive reverse print of an integer
void rev_print(int n){
if(n/10==0){
cout<<n%10;
return;
}
cout<<__________________________;
rev_print(___________________);
}
void main(){
int a;
cin>>a;
rev_print(a);
}
// recursive print of an integer
void print(int n){
if(n/10==0){
cout<<n%10;
return;
}
print(_______________);
cout<<___________________;
}
void main(){
int a;
cin>>a;
print(a);
}



All times are GMT +5.5. The time now is 07:10.