RESTRICTED USE LA TROBE UNIVERSITY CSE1PES/CSE5CES PRACTICE EXAM Reading Time: 15 minutes Writing Time: 120 minutes (Note: Actual CSE5CES 2017 exam is 150 minutes writing time with one extra question....

1 answer below »
I have a live assignment quiz submission on friday 20/05/2020 which will run for 1 hour that is from 12:00 to 1:00 pm. Also attaching the sample for quiz for your reference and let me know the quote. Waiting for your response..


RESTRICTED USE LA TROBE UNIVERSITY CSE1PES/CSE5CES PRACTICE EXAM Reading Time: 15 minutes Writing Time: 120 minutes (Note: Actual CSE5CES 2017 exam is 150 minutes writing time with one extra question. CSE1PES is 120 minutes writing time) INSTRUCTIONS TO CANDIDATES 1. Total marks = 120 2. Answer all questions. 3. Write your answers in the space provided in the question paper after each question. 2 OVER/ Question 1 [15] This question has 10 parts. Each part is a multiple choice question. Answer each multiple choice question by placing a tick mark () in box opposite the correct (best) option. 1. Which of the following is a valid variable name: a) _count  b) total$  c) 2nd_num  d) long  e) third number  2. Which of the following is the hexadecimal representation of the binary number 01001010: a) 0x8F  b) 0x4A  c) 0xA4  d) 0x23  e) 0xA23  3. Which of the following types is used to store a collection of related data items: a) int  b) struct  c) double  d) float  e) char  4. To test if two strings (str1, str2) consist of the same characters in C, you should use: a) if(str1 == str2)  b) if(strcmp(str1, str2) != 0)  c) if(strcmp(str1, str2) == 0)  d) if(str1 != str2)  e) if(strcompare(str1,str2)==0)  3 OVER/ 5. Which is the correct way to define the macro for N to be replaced by 100 a) #define N = 100  b) #include N =100  c) #define N 100  d) #define N 100;  e) #define N = 100;  6. Which is the correct way to declare an array of pointers that point to objects of type int, where the array is of size 5? a) int a = 5;  b) int* a;  c) int* a[] = 5;  d) int* a[5];  e) int a[5];  7. Assume we have an executable program in the file called ComplexNumber. If we enter the following on the command line, what will be the value of argv[2] within our Program? ComplexNumber 6 + 5i - 10 + 2i a) 5  b) 5i  c) 6  d) +  e) 2i  8. In the following call to the C standard I/O library function fprintf fprintf(outfile, “%s\n”, word); The type of the variable outfile must be a) A string (a NULL terminated array of characters)  b) A pointer to an array of characters  c) A pointer to FILE (FILE *)  d) A pointer to int (int *)  e) int  4 OVER/ 9. In a C program an unsigned int variable named flag is used to hold a number of single bit flags. In an if statement of the form if(expression) {//Code to be executed}; you have to test the condition if the right-most bit (the least significant bit) or the third rightmost bit of the variable flag is set (has the binary value 1). What is the correct expression to test this condition? a) flag && 0x05  b) flag && 0  c) (flag && 0x05) != 1  d) (flag || 0x05) == 1  e) (flag && 0xFA) == 1  10 What is the value in the variable lock after the following code segment is executed? unsigned input = 5; unsigned lock = 0; lock ^= 1 < input;="" a)="" 0x01="" ="" b)="" 0x05="" ="" c)="" 0x20="" ="" d)="" 0x00="" ="" e)="" 0x40="" ="" 5="" over/="" question="" 2="" [25]="" this="" question="" has="" 10="" parts.="" answer="" each="" part="" in="" the="" space="" provided.="" a)="" what="" is="" the="" output="" of="" the="" following="" c="" code="" fragment?="" #include=""> int main() { int a = 9, b = 4, c; c = a/b; printf("The result is: %d\n", c); return 0; } Answer: b) What is the output of the following C code fragment? printf("First:%d, Second:%.1f\n", 18, 4.555); Answer: 6 OVER/ c) What is the output of the following C code fragment? int place = 0; switch(place) { case 0: printf("Gold\n"); break; case 1: printf("Silver\n"); break; case 2: printf("Bronze\n"); break; } printf("End of list"); Answer: d) What is the value held in the variable result following the execution of this C code fragment? int result = 1, a = 3, b = 5, c = 4; if((a < b)="" ||="" (c="=" b))="" {="" result="c;" }="" else="" if(a="" !="c)" {="" result="b;" }="" else="" {="" result="a;" }="" answer:="" 7="" over/="" e)="" given="" that="" the="" user="" input="" is="" as="" follows:="" 4,="" 2.995="" what="" is="" the="" output="" of="" the="" following="" c="" program?=""> int main() { int a, b; float c; scanf("%d,%d%f", &a, &b, &c); a -= b; c *= b; printf("Result:%d, %.4f", a, c); return 0; } Answer: f) What is the output of the following C code fragment? int num = 1; int i, j; for(i = 0; i < 2;="" i++)="" {="" for(j="0;" j="">< 4;="" j++)="" {="" switch(num)="" {="" case="" 5:="" printf("*="" ");="" break;="" case="" 2:="" printf("#="" ");="" break;="" default:="" printf("%d",="" num);="" }="" ++num;="" }="" printf("\n");="" }="" answer:="" 8="" over/="" g)="" what="" is="" the="" output="" of="" the="" following="" c="" code="" fragment?=""> void mult(int num); int main() { int x = 5; mult(x); printf("%d", x); return 0; } void mult(int num) { num *= 2; printf("%d\n", num); } Answer: h) What is the output of the following C code fragment? int y = 8; int* p = &y; func(p); printf("%d", y); ... void func(int* p) { *p = 3; } Answer: 9 OVER/ i) What is the output of the following C code fragment? int x = 1, y = 2, *p = &x, *q = &y; x = 3; *p = 5; *q = x + y; printf("%d\n", y); Answer: j) What is the output of the following C code fragment? #include void func(int *p, int n, int *r); int main() { int arr[4] = {1, 6, 3, 5}; int* ptr_position = arr; int i, n = 4; float val=0; for(i=0; i void exam_function(int e, int*
Answered Same DayMay 20, 2021CSE5CESLa Trobe University

Answer To: RESTRICTED USE LA TROBE UNIVERSITY CSE1PES/CSE5CES PRACTICE EXAM Reading Time: 15 minutes Writing...

Arun Shankar answered on May 22 2021
135 Votes
There is nothing to upload here as this was an online quiz.
Just uploading this psuedo text file on
ly for the sake of it.
Thank you.
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here