Question
You can assume the code given is from working code. Answer the true/false questions that follow. You MUST explain why your answer is true or
You can assume the code given is from working code. Answer the true/false questions that follow. You MUST explain why your answer is true or false to receive credit.
char present_num(int **all_nums, int size, int num_to_find)
{
char answer='n'; int i; for(i=0;i if(**all_nums==num_to_find) { answer='y'; } all_nums++; } return answer; } int same_stuff(int* x_arr[]) { if(*x_arr[0]==*x_arr[1]) { return 1; } else { return 0; } } Only one type of unary operator is used in the code. sizeof(x_arr[0])==sizeof(*x_arr[0]) sizeof(x_arr)==sizeof(all_nums) The for loop will not always iterate the same number of times. all_nums++; will move the pointer ahead 4 bytes (the size of an int on my machine). The function same_stuff will return 1 if the values held in index 0 and 1 of x_arr are equal. num_to_find=**all_nums; would be a valid line of code. same_stuff will return 0 for all cases except for one. If the value of num_to_find is found to match an element of all_nums, the value of answer will be y. 10. int* ptr= *x_arr[0]; would be a valid line of code.
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