PRF 192 test, Questions and answers. Graded A+. rated A+
PRF 192 test, Questions and answers. Graded A+. rated A+ Given the declaration: int ref[]={1,2,4};What is the value of *(ref+1)? 2 3 MULTIPLE CHOICE OPTIONS Which is false? Constant variables need not be defined as they are declared and can be defined later 3 MULTIPLE CHOICE OPTIONS float data type takes ..... bits? 32 3 MULTIPLE CHOICE OPTIONS Comment on the output of this C code? #include stdio.h int main(){ int a[5] = {1, 2, 3, 4, 5}; int i;for (i = 0; i 5; i++) if ((char)a[i] == '5') printf("%dn", a[i]); else printf("FAILn"); } Program will compile and print FAIL for 5 times 3 MULTIPLE CHOICE OPTIONS Consider the following code: if(a==b) printf("n the number are equal"); else if(ab) printf("n the smaller number is: %d",a); else printf("n the smaller number is: %d",b); in the above code, if a=14 and b=9, then the .... clause is executed else 2 MULTIPLE CHOICE OPTIONS In C, correct order(s) of a function implementation:Choose at least one answer. Return type, function name, parameters, body 3 MULTIPLE CHOICE OPTIONS The precedence of arithmetic operators is (from highest to lowest) %, *, /, +, - 3 MULTIPLE CHOICE OPTIONS What is the output of this C code?#include stdio.h void main(){ int x = 4; int *p = &x; int *k = p++; int r = p - k; printf("%d", r); } 1 3 MULTIPLE CHOICE OPTIONS When does the code block following while(x100) execute? when x is less than one hundred 3 MULTIPLE CHOICE OPTIONS For which value(s) of the integer x will the following code become a finite loop? int n=1; while(1){ printf("%d",n); if (n==3) break; n+=x; } 1 or 2 3 MULTIPLE CHOICE OPTIONS Which statements are correct about the line of code below?int* p1,p2; p1 and p2 are pointers 2 MULTIPLE CHOICE OPTIONS Variable name resolving (number of significant characters for uniqueness of variable) depends on Compiler and linker implementations 3 MULTIPLE CHOICE OPTIONS Given the below code: char s[50]; gets(s); int n=strlen(s); Which option is TRUE about n?
Document information
- Uploaded on
- August 12, 2023
- Number of pages
- 26
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers