adplus-dvertising

C Programming And Assembly Language Assignment 3 Answers

We Discuss About That C Programming And Assembly Language Assignment 3 Answers

NPTEL C Programming And Assembly Language Assignment 3 Answers – Here All The Questions and Answers Provided to Help All The Students and NPTEL Candidate as a Reference Purpose, It is Mandetory to Submit Your Weekly Assignment By Your Own Understand Level.

Are you looking for the Assignment Answers to C Programming And Assembly Language Assignment 3 Answers? If Yes You are in Our Great Place to Getting Your Solution, This Post Should be help you with the Assignment answer to the National Programme on Technology Enhanced Learning (NPTEL) Course “NPTEL C Programming And Assembly Language Assignment 3 Answers”

Table of Contents

NPTEL C Programming And Assembly Language Assignment

ABOUT THE COURSE :

Students who complete their bachelors degree (BE/ BTech) in computer science or electrical engineering do extensive course work in Microprocessors and then in C programming. However, what is missing in the current curriculum is to explicitly establish the link between the two. Specifically we look at how a C program is translated to assembly language and how it eventually gets executed on a microprocessor. Through, animations we show what happens in the stack, data and code segment, of the microprocessor when a C program is executed.

Next Week Assignment Answers

SciShowEngineerTelegram

This course can have Associate in Nursing unproctored programming communication conjointly excluding the Proctored communication, please check announcement section for date and time. The programming communication can have a weightage of twenty fifth towards the ultimate score.

Final score = Assignment score + Unproctored programming exam score + Proctored Exam score
  • Assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course.
  • ( All assignments in a particular week will be counted towards final scoring – quizzes and programming assignments). 
  • Unproctored programming exam score = 25% of the average scores obtained as part of Unproctored programming exam – out of 100
  • Proctored Exam score =50% of the proctored certification exam score out of 100
YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF ASSIGNMENT SCORE >=10/25 AND
UNPROCTORED PROGRAMMING EXAM SCORE >=10/25 AND PROCTORED EXAM SCORE >= 20/50. 
If any one of the 3 criteria is not met, you will not be eligible for the certificate even if the Final score >= 40/100. 

CHECK HERE OTHERS NPTEL ASSIGNMENTS ANSWERS 

BELOW YOU CAN GET YOUR NPTEL C Programming And Assembly Language Assignment 3 Answers 2022? :

 

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

1. Which of the following statement/s will be printed when the above C code executes?

a. MACRO=MACRO
b. a=MACRO
c. MACRO=a
d. a=a
e. None of the above

Answer:- c

2. Regarding pre-compilation and then compilation, which of the following statement/s are true?

a. Statement-2 is a global variable declaration.
b. The compilation replaces MACRO by it’s value ‘a’ only where it appears as a C macro.
c. The pre-compilation replaces MACRO by it’s value ‘a’ only where it appears as a C macro.
d. None of the above

Answer:- c
Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

3. Which of the following statement/s is/are true?

a. Linker combines all object files and generates an executable.
b. If statement-1 of the C code is removed, a compiler error is thrown.
c. If statement-1 of the C code is removed, a linker error is thrown.
d. If statement-1 of the C code is removed, no error is reported.
e. Syntactical mistakes yield compilation errors.
fSyntactical mistakes yield pre-compilation errors.

Answer:- a, b, e

4. What error/s occur when the following code is compiled and executed?

a. Compiler error
b. Linker error
c. Assembler error
d. The above code does not produce any error

Answer:- b

5. What error/s occur when the following code is compiled and executed?

a. Compiler error
b. Linker error
c. Assembler error
d. The above code does not produce any error

Answer:- a

6. What error/s occur when the following code is compiled and executed?

a. Compiler error
b. Linker error
c. Assembler error
d. The above code does not produce any error

Answer:- a
Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

7. With respect to the main() function as shown above and its local variable space, answer this question. What is the minimum value of N0?

Answer:- 12

In statement 13 of the above C Program, a function call SurfAr(3,5,2) is made which translates into appropriate assembly code. The values of the non-negative integers N1, N2 and N3 respectively are:

8. N1= ____________

Answer:- 2

9. N2= ____________

Answer:- 5

10. N3= ____________

Answer:-
Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

11. When statement-13 of the C Program in main() is executed, it performs a function call as shown in the assembly equivalent code at the code segment address 0xC306. After the assembly code executes instruction at 0xC306, what is ADDR_1 and the value in the address pointed by ESP, i.e., [ESP] respectively?

a. ADDR_1= 0xC300 and [ESP]=0xC500
b. ADDR_1= 0xC500 and [ESP]=0xC307
c. ADDR_1= 0xC500 and [ESP]=0xC300
d. ADDR_1= 0xC307 and [ESP]=0xC500

Answer:- b

12In the case of a function call, it is required to restore the context of the CALEE when the CALLED function returns back to the CALEE. With this premise, determine what REG_1 and REG_2 respectively are?

a. REG_1=ESP and REG_2=EBP
b. REG_1=EIP and REG_2=ESP
c. REG_1=EBP and REG_2=EIP
d. REG_1=EBP and REG_2=ESP

Answer:- d

13With respect to the SurfAr() function as shown above and its local variable space, answer this question. What is the minimum value of N5?

Answer:- 10

14. With respect to the SurfAr() function as shown above and its local variable space, answer this question. What is the value of QUAL?

a. QUAL=BYTE
b. QUAL=WORD
c. QUAL=DWORD
d. QUAL=QWORD

Answer:- c

15. N6=  ______________

Answer:- 6

16. N7=  ______________

Answer:- 12

17. N8=  ______________

Answer:- 16

18. Analyse the function SurfAr() and answer this question. What is the value of VAL1, as in the address location 0xC50C?

VAL= _______

Answer:- 0

19. What is the value of VAL2, as in the address location 0xC307?

VAL2= _______

Answer:- 12

20. Which of the following statements are true about the function call SurfAr() from main()?

a. __ccdecl convention is used
b. .__stdcall convention is used.
c. CALLER performs the necessary operations for stack clean up.
d. CALLEE performs the necessary operations for stack clean up.

Answer:-
Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

21. Which of the following statements are true about the above C program and its assembly code?

a. Statements in the address location 0xC300 and 0xC500 are used to store the context of its respective CALEE function.
b. Statement in the address location 0xC306 performs the task of storing the return address in the register EAX.
c. Statement in the address location 0xC307 is used to perform explicit stack clean up by the CALEE.
d. Statements in the address location 0xC302 and 0xC502 are used to set the local variable context for its respective function.
e. Statement in the address location 0xC511 is used restore the context of the main() function.

Answer:- a, c, d, e

22. Which of the following will be the assembly statements corresponding to which statement 5 of the above C++ code compiles to?

a. PUSH EBP
b. PUSH ECX
c. MOV EBP, ESP
d. None of the above

Answer:- a, c

23. Which of the following will be the assembly statements corresponding to which statement 10 of the above C++ code compiles to?

Answer:- b, c, d, e

24. When statement 14 compiles, one of the assembly statements it translates to:

LEA ECX, DWORD PTR [EBP-VAL] What is the non-negative integer VAL?

Answer:- 4

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Yhaa You have done it but next? if YOU Want to your Others C Programming And Assembly Language Assignment 3 Answers Then Follow US HEREand Join Telegram.

Related Posts

Leave a Reply

Your email address will not be published.