Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q1 5 Points Which of the following special symbol is allowed in a variable name? A. * (asterisk) B. I (pipeline) C. - (hyphen) D.
Q1 5 Points Which of the following special symbol is allowed in a variable name? A. * (asterisk) B. I (pipeline) C. - (hyphen) D. _ (underscore) Q2 5 Points What is the NULL character in C: nil "null" 'O' '\0' 193 5 Points What's the value of integer a after this statement gets executed? inta=a-b; 'a' 'b' 1 1 Q4 5 Points Choose the correct statement about header files in C. Header files can contain function declarations and definitions Header files can contain function declarations but not function definitions Header files will be compiled into machine code in preprocessing stage None of the above Q5 5 Points Choose the correct statement about the following declarations. extern int func1() return 1}; int func2() return 2}; A. extern will make func1 global; func2 will be only visible to the current source file scope B. fun1 and func2 will be globally visible because by default all functions in C are extern and global Q6 5 Points Choose the correct statement about function declaration and definition A. a function can have only one declaration and one definition B. a function may have several declarations, and several definitions C. a function may have several declarations, but only one definition D. None of the above Which of the following is the correct order of evaluation for the below expression? z=x+yz/4%2-1 A. /%+= B. =/%+ C. /%+= D. %/+= Q8 5 Points A function cannot be defined inside another function A. True B. False What does the following declaration mean? int (*ptr) [10]; A. ptr is an array of pointers to 10 integers B. ptr is a pointer to an array of 10 integers C. ptr is an array of 10 integers D. it is a wrong declaration Q10 5 Points Select the statement that is correct about this cod int a=1; char *pa =( char )&a; printf("\%d ", *pa); It will print out 1 on the little-endian machine. It will print out 0 on the little-endian machine. It will print out 1 on all machines. It will print out 0 on all machines. Q11 5 Points Declare a pointer to a function that receives an int pointer and returns a pointer to float A. float * (ptr) int; B. float ( ptr)(int) C. float ptr)(int*) D. float (*ptr)(int) Q12 5 Points Select the statement that is correct about the value p points to after these two statements are executed: charp="Helloworld";p[]=h; The string that p points to will change to "hello world" The string that p points to will change to "h" The second statement is incorrect since we can not update the values that p points to None of the above 5 Points Allocated heap memory within a local function will be released when exiting from that local function. True False Q14 5 Points Choose all the correct statements about the below code snippets? int main(int argc, char argv[] ) \{ \} return 0; A. argc contains the count of arguments supplied at the command-line C. argc is a value supplied as the first argument at the command-line
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started