有几个题目不会,请教
46) Consider the following code snippet:void main( )
{
int k = 35, z ;
k = func1 ( k = func1 ( k = func1 ( k ) ) ) ;
printf ( "k = %d", k ) ;
}
func1 ( int k )
{
k++ ;
return ( k ) ;
}
What would be the output of the given code?
A) k=38 B) k=37 C) k=35 D) k=39
47) Which one is a main advantage of pointers?
A) Pointer variable must be declared before it is used.
B) Pointer variable is not having any value but it has address of the another variable.
C) Returns multiple data items from a function using its functional arguments
D) Pointer is a derived data types.
48) Consider the following code snippet:
main( )
{
char str[ ]="Nagpur";
str[0] = 'K';
printf ( “%s”, str ) ;
str = “Kanpur” ;
printf ( “%s”, str + 1 ) ;
}What would be the output of the above code?
A) Kagpur Kanpur B) Nagpur Kanpur C) Kagpur anpur D) Error
49) Fill the blanks for the following traverse on a tree:
1) Visit the root
2) Traverse the left subtree in __order
3) Traverse the right subtree in __order
A) Pre B) in C) post D) symmetric
谢谢了