PRF 192 - SP19 Final Exam with correct answers
Once the function ends, the control is returned back to the ... function and execution continues from the statement immediately after the function call a. executing b. called c. declared d. calling correct answer A what number is equivalent to -4e3? a.-4000 b.-400 c..004 d..0004 e.-40 correct answer A what is the output when the sample code below executed? #includestdio.h int fn(int v){ if(v==1||v==0) return 1; if(v%2==0) return (fn(v/2)+2); else return(fn(v-1)+3); } int main() { printf("%dn",fn(5)); return (0); } a.6 b.9 c.8 d.7 e.5 correct answer C which 2 options are correct about the function scanf? a.EOF indicates that scanf filled all addresses successfully b. scanf returns the number of addresses successfully filled of EOF n avoid type d.EOF indicates that scanf did not fill any address AND encountered an end of data character. D what is the output when the sample code below is executed? int s=35; printf("%d%d%d",s==35,s+20,s40)
Información del documento
- Subido en
- 30 de marzo de 2023
- Número de páginas
- 21
- Escrito en
- 2022/2023
- Tipo
- Examen
- Contiene
- Preguntas y respuestas