Answer by true or false :
a) There could be several function calls in a program. True False
b) Function call can be placed wherever it is required, regardless of the function’s number of calls. True False
c) There are no conditions on where to place a function prototype. True False
d) Functions definitions should always be placed after the main function. True** False**
e) A double variable can be pointed to by an integer pointer without loss/change of information. True False
f) An integer variable can be pointed to by an integer pointer without loss/change of information. True False
g) An integer variable can be pointed to by an integer pointer without loss/change of information. True False
h) The content of a pointer should always be an address of another normal variable. True** False**
i) The content of a pointer can be copied into another pointer of the same type without loss of information. True False
j) The & and * operators will do the same operations when they are used with pointers.True False
k) The * operator has more than one meaning which is determined by the context of usage. True False
l) Any function that is not of type void and it doesn’t use pointers, should contain a return statement. True False
m) There is no difference between call by value and call by reference in programming languages. True False

Can any1 check if my aswers are correct or no ??

Recommended Answers

All 3 Replies

f and g are the same question.

You didn't answer h

i is ambiguous. If they mean the value of the pointer itself, then it is true. If they mean the integer to which the pointer points, then it would be true only if memory were allocated to the destination pointer or the destination pointer already points to an integer variable.

j is incorrect

Otherwise I your answers are correct

All that AD said, plus these corrections:

c) is True. A function prototype / declaration can appear anywhere (well, anywhere any other variable declaration can appear), this includes the global scope, namespace scope, class scope, function body, and even within any { } scope within the function body. At least, that's my understanding of the question, but "no conditions" is too vague (because, of course, it must appear before it is needed, so that's one condition, and then there are also obvious places where you can't put a function prototype, like within a string literal or something, but these are trivial conditions).

h) is correct.

l) This question is weird, it's the "and it doesn't use pointers" part that I don't understand. This makes no difference at all. In any case, the answer is correct, True.

tnxXx all :))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.