TCS Company Programming Functions

If a function is defined as static, it means
1. The value returned by the function does not change
2. all the variable declared inside the function automatically will be assigned
initial value of zero
3. It should be called only within the same source code / program file.
4. None of the other choices as it is wrong to add static prefix to a function

Read Solution (Total 5)

TCS Other Question

Which of the above are correct statements?
1. 2,3
2. 1,2
3. 1,2,3
4. 1,2,3,4
Comment on the below while statement=while (0 == 0) { }
A) It has syntax error as there are no statements within braces {}
B) It will run forever
C) It compares 0 with 0 and since they are equal it will exit the loop immediately
D) It has syntax error as the same number is being compared with itself