![]() Related Questions Which of the following about automatic variables within a function is correct ?a.its type must be declared before using the variableb.they are localc.they are not initialised to zerod.they are global. C Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of the alternativesa.return(sqr(a));b.printf("sqr(a)");c.return(a*a*a);d.printf("%d",sqr(a)); D A memory of 20 bytes is allocated to a string declared as char *sthen the following two statements are executed:s="Etrance"l=strlen(s);what is the value of l ?a.20b.8c.9d.21 C Given the piece of codeint a[50];int *pa;pa=a;to access the 6th element of the array which of the following is incorrect?a.*(a+5)b.a[5]c.pa[5]d.*(*pa + 5) A Regarding the scope of the varibles;identify the incorrect statement:a.automatic variables are automatically initialised to 0b.static variables are are automatically initialised to 0c.the address of a register variable is not accessiabled.static variables cannot be initialised with any expression B C Latest Answer : C is invalid>> is an error here.It can be used with console input and console output but this left chevron operotor cannot be directly used to assign. ... What does the following code do?fn(int n,int p,int r){static int a=p;switch(n){case 4:a+=a*r;case 3:a+=a*r;case 2:a+=a*r;case 1:a+=a*r;}}a.computes simple interest for one yearb.computes amount on compound interest for 1 to 4 yearsc.computes simple interest for four year d.computes compound interst for 1 year B Which of the following about automatic variables within a function is correct?A. Its type must be declared before using the variableB. They are localC. They are not initialized to zeroD. They are global Write one statement equivalent to the following two statements: x=sqrA.; return(x);Choose from one of the alternativesA. return(sqrA)B. printf("sqrA.")C. return(a*a*a)D. printf("%d",sqrA.) A memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed:s="Entrance"l=strlen(s);what is the value of l ?A. 20B. 8C. 9D. 21
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||