Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exam
Message
From
13/05/2004 07:26:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Exam
Miscellaneous
Thread ID:
00903522
Message ID:
00903522
Views:
63
hi;


i need help to solve this qustions at C++(what is the out put );
thanks alot.



Q1:for the given functions.
//function f

int f(int n){

int i=1;

  while(i<n){

cout<<"$";

   ++ i ;

}

return (n-1);

}

//function h

voide h(int m){

cout<<"*";

f(m+1);

return;

}

//***********************************************************
fill the result column after calling the functions:

//************************************************************

             calling functions in the  main             result

A)                        f(4);                        ----------
B)                        f(f(2));                     ----------
c)                        f(3))+f(3);                  ----------
D)                        h(2);                        ----------
E)                        h(f(3));                    ------------

//******************************************************************* 

q2:- correct errors in the following statement:

1)       int*number;

cout<<number<<endl;

 

2)       double *realptr;

long *integerptr;

integerptr= realptr;   //i think it must be all of them double or long

 

3)       in *x,y;

x=y;

 

4)       char[]="this is acharacter array";

for (  ; s!='\0';s++)

cout<<*s<<'' '';

 

5)double x=19.34;

           double xptr=&x;

            cout<<xptr<<endl;


Next
Reply
Map
View

Click here to load this message in the networking platform