## NPTEL Assignment ## [Week 1 to 4] NPTEL C Programming And Assembly Language Assignment Answers 2023

NPTEL C Programming And Assembly Language Assignment Solutions ## NPTEL C Programming And Assembly Language Week 4 Assignment Answers 2023

1. By observing the compiled assembly output, the values of V3, V4, V5, and V6 respectively are

V3= 4; V4= 2; V5= 7; V6= 3; V3= 3; V4= 7; V5= 2; V6= 4; V3= 2; V4= 4; V 5= 3; V6= 7; V3= 7; V4= 3; V5= 4; V6= 2;

2. What does the above  C co d e  return after execution?

3. Based on passing parameters between functions, what are the values of V1 and V2, respectively?

V1=4; V2=8; V1= -4; V2= -8; V1= 8 ; V 2= 12; V1= -8; V2= -12;

4. Based on the calling convention us e d to call the function area shown in the C code, what is the value of V7?

5. If the calling convention of the function area was _cdecl or _stdcall, then, what is the value of V8 ? (Mark all the correct option/s)

If stdcall convention, then V8 = 8 If stdcall convention, then V8 = 0 If stdcall convention, t h en V8 = 16 If cdecl convention, then V8 = 0 If cdecl convention, then V8 = 8 If cdecl convention, then V8 = 16

6. Based on the function  ma i n , what is the value of V9?

7. Assembly statement 18 corresponds to which C statement in the above C code?

Statement 1 Statement 3 State m ent 7 Statement 8

8. What data types can the above function myprintf handle correctly?

int as %d char as %c double a s %f string as %s

9. How many times does statement 30 get executed during the e ntire course of the execution of statement 42

10. The value of the C variable iVal aft e r the execution of statement 21 during the evaluation of statement 42.

• iVal = ___

11. What are the RED highlighted integer V1?

12. What are the RED highl i ghted integer V2?

13. What is printed after the execution of the above C code?

Check: STRING, Integer: 2, Fraction: 1.678, UF Check: STRING, Integer: 2, Fraction: 1.678, 4 Check: STRING, Integer: 2, Fr a ction: 1.68, UF Check: STRING, Integer: 2, Fraction: 1.68, 4

14. What will be printed when the above function is executed?

Val is 0 Val is 9 9 7 None of the above

15. Upon execution of statement 11 of the above C code, is the value 142 in the C variable a secure?

No, it can be accessed if a stack snapshot is t aken after statement 11 executes. Yes, it is secure, as its value is now changed to 0.

16. If statement 11 is changed to val=func(2); Then, upon execution of statement 11 of the above C code, is the value 142 in the C variable a secure?

No, it can be accessed if a stack snap s hot is taken after statement 11 executes. Yes, it is secure as its value is now changed to 0.

## NPTEL C Programming And Assembly Language Week 3 Assignment Answers 2023

Given below is a C code, analyse the following code and answer Questions 1-3 based on it. Q1. Which of the following statement/s will be printed when the above C code executes? MACRO=MACRO a=MACRO MACRO=a a=a None of the above

Q2. Regarding pre-compilation and then compilation, which of the following statement/s are true? The pre-compilation replaces MACRO by it’s value “MACRO” only where it appears as a C macro. Statement-2 is a global variable declaration. The compilation replaces MACRO by it’s value “MACRO” only where it appears as a C macro. None of the above

Q3. Which of the following statement/s is/are true? Linker combines all object files and generates an executable. If statement-1 of the C code is removed, a compiler error is thrown. If statement-1 of the C code is removed, a linker error is thrown. If statement-1 of the C code is removed, no error is reported.

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

Compiler error Linker error Assembler error The above code does not produce any error

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

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

Q7. With respect to the main() function as shown above and its local variable space, what is the minimum value of N0?

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

Q11. 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? ADDR_1= 0xC300 and [ESP]=0xC500 ADDR_1= 0xC500 and [ESP]=0xC307 ADDR_1= 0xC500 and [ESP]=0xC300 ADDR_1= 0xC307 and [ESP]=0xC500

Q12. In 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? REG_1=ESP and REG_2=EBP REG_1=EIP and REG_2=ESP REG_1=EBP and REG_2=EIP REG_1=EBP and REG_2=ESP

Q13. With respect to the SurfAr() function as shown above and its local variable space, what is the minimum value of N5?

Q14. With respect to the SurfAr() function as shown above and its local variable space, what is the value of QUAL? QUAL=BYTE QUAL=WORD QUAL=DWORD QUAL=QWORD

With respect to the SurfAr() function as shown above and its local variables, the values of the non-negative integers N6, N7 and N8 respectively are:

Q15. N6= ___

Q16. N7= ___

Q17. N8=___

Q18. For the function SurfAr(), what is the value of VAL1, as in the address location 0xC50C? VAL1= _

Q19. What is the value of VAL2, as in the address location 0xC307? VAL2= _

Q20. Which of the following statements are true about the function call SurfAr() from main()? _cdecl convention is used. _stdcall convention is used. CALLER performs the necessary operations for stack clean up. CALLEE performs the necessary operations for stack clean up.

Q21. Which of the following statements are true about the above C program and its assembly code? Statements in the address location 0xC300 and 0xC500 are used to store the context of its respective CALEE function. Statement in the address location 0xC306 performs the task of storing the return address in the register EAX. Statement in the address location 0xC307 is used to perform explicit stack clean up by the CALEE. Statements in the address location 0xC302 and 0xC502 are used to set the local variable context for its respective function. Statement in the address location 0xC511 is used restore the context of the main() function.

Which of the following will be the assembly statements corresponding to which statement 5 of the above C++ code compiles to? PUSH EBP PUSH ECX MOV EBP, ESP None of the above

Q23. Which of the following will be the assembly statements corresponding to which statement 10 of the above C++ code compiles to? PUSH EBP PUSH ECX MOV EBP, ESP SUB ESP, 12 SUB ESP, 8 SUB ESP, 4 None of the above

Q24. 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? VAL= _

## NPTEL C Programming And Assembly Language Week 2 Assignment Answers 2023

1. What expression will the register EAX bear immediately af t er the execution of statement 11?

• EAX=((a&b)|x)⊕(x&y)
• EAX=(a|b|x)⊕( x +y)
• EAX=((a&b)|x)⊕(x+y)
• EAX=(a|b+x)⊕(x|y)

2. What value will the register EAX bear im m ediately after the execution of statement 11?

3. If after statement 11, we added the st a tements what value will the register EDX bear immediately after the execution of statement 13?

4. What is the value in EAX when the program reach e s statement 14?

5. If the instructions were exe c uting on a 32-bit processor, what is the largest value one can assign to N in statement 3 such that the program reaches statement 14 without an overflow of the accumulator in statement 9?

6. Let the answer to questi o n 5 be k. If we replace N=5 (in statement 3) by N=k, what is the value in EAX when the program reaches statement 14?

7. Which of the following C statements do not get compiled to assembly statements when compiled for maximumoptimizations ?

• statement 3
• statement 4
• statement 5
• stateme n t 6
• statement 7
• None of the above

8. If statement 4 was changed to a=s+z and statement 6 was changed to r=a−s , then which of the following C statements do not get compiled to assembly statements when compiled for maximumoptimizations ?

• stateme n t 5
• statement 6

9. If statement 7 was changed to return x , then which of the following C statements do not get compiled to assembly statements when compiled for maximumoptimizations ?

• None of th e above • None of the ab o ve

11. Which of the following is the purpose of the assembly statement 3?

• To initialis e the C variable count
• To load the register ECX with the value of C variable count
• To load the register ECX with the address of the C variable pA
• To load the register ECX with the value i n the address pointed by the C variable pA

12. Which of the following assembly statement(s) implement the functionality of the C statement 4?

• statement 8
• state m ent 9
• statement 10

13. Statement 5 in the C code maps to assembly statement _____.

14. If arrlenfn is called from main, as shown below, it will print out len= ______? 15. If statement 1 of the C code is changed to int arrlenfn(short int pA), then which of the following will statement 5 of the compiled assembly code change to?

• cmp W O RD PTR [ecx+eax 2], 0
• cmp DWORD PTR [ecx+eax 2], 0
• cmp WORD PTR [ecx+ea x 4], 0
• cmp DWORD PTR [ecx+eax*4], 0

16. Mark the valid option/s that will be printed once the above C program is executed.

• Print=160,60
• R et urn Value=160
• Print=60,160
• Return Value=60
• Print=16 0 ,160
• Return Value=160

17. What is the value in the C variables a and b after statement 6 executes? (Assume that the main() function is executed first and control has been transferred to the function swap(int x, int y))

• a=160, b=60
• a=60, b =60
• a=60, b=160
• a=160, b=160

18. What is the value in the C variables a and b after statement 7 executes? (Assume that the main() function is executed first and control has been transferred to the function swap(int x, int y ))

• a=160, b =60

19. Mark the valid option/s that will be printed once the above C program is executed.

• Print=60, 6 0
• Print=160,160

## NPTEL C Programming And Assembly Language Week 1 Assignment Answers 2023

1. What are the values of the registers AX and BX after the following assembly code executes ? • AX=1, B X =1

2. What is the value of the zero flag at t h e end of this program’s execution 3. For the following instructions When MOV AL,01 is reac he d it is necessarily the case that CL= 0

4. Say the following 7 bytes are st o red in the extra segment with address of the last element 81 being stored at START_ADDR and the addresses increasing as you go up the list from the bottom up. Consider the following program to search f o r 47. What is the value of ECX wh e n REPNE SCASB finishes executing?

5. Say the opcode size of REP MOVSB is 1 byte and at present EIP=0x0F21 and ECX=09. The instruction REP MOVSB is executed. After the execution, we observe that CX=00. Then, EIP= _ ?

6. NOTE:- ECS=0x0141, EDS=0x160 0 , ESS=0x2512, EES=0x3509, EAX=0x0116, EBP=0x4567. Assume that there are two arrays as follows:- After the following s nipped code executes, what will be the values in Array-1, Array-2? 7. The value stored i n the registers EAX, EDX after the execution of the following code snippet is • EAX=06, EDX=00
• EAX=12, E DX=00
• EAX=06, EDX=02
• EAX=12, EDX=02

8. If EAX=0x2117, ECX=0x2434, ESS=0x1041 an d ESP=0xF612. Analyse the following assembly code snippet. What is the value of ESP after the following code executes? 9. If ECS=0x0141, EDS=0x1634, ESS=0x2512, EES=0x3 50 9, EAX=0x0116, EBP=0x4567, the Address accessed by the instruction [EAX+0x0026] is

10. The value stored in the ECX register after the above code snippet executes:

11. The value stored in the register EDI after the above code s nippet executes:

12. What is the value of the Direction Flag after the abov e code snippet executes

• Cannot s ay

Related posts. ## [Week 10] NPTEL Introduction To Industry 4.0 And Industrial Internet Of Things Assignment Answers 2023 ## [Week 11] NPTEL Introduction To Internet Of Things Assignment Answers 2023 ## [Week 12] NPTEL Natural Language Processing Assignment Answers 2023 ## NPTEL AI:Constraint Satisfaction Assignment Answer (Week 1-2) 2023 ## NPTEL Applied Accelerated Artificial Intelligence Assignment Answer (week 1-3) 2023 ## [Week 2] NPTEL Biomedical Nanotechnology Assignment Answers 2023

Save my name, email, and website in this browser for the next time I comment. ## Problem Solving Through Programming In C | NPTEL 2022 | Week 0 Assignment Solutions

This set of MCQ(multiple choice questions) focuses on the  Problem Solving Through Programming In C NPTEL assignment answers .

You should practice these questions to improve fundamentals of Problem Solving Through Programming In C needed for various interviews (like company interview, campus interview, walk-in interview), entrance exams, placements and other competitive exams. All the questions in this particular section are based on only “ Problem Solving Through Programming In C NPTEL assignment answers “.

## Course layout

Week 0 : Assignment Week 1 :   Introduction to Problem Solving through programs Week 2 :   Arithmetic expressions, Relational Operations, Logical expressions; Introduction to Conditional Branching Week 3 :   Conditional Branching and Iterative Loops Programming Assignment Week 4 :   Arranging things : Arrays Programming Assignment Week 5 :   2-D arrays, Character Arrays and Strings   Programming Assignment Week 6 :   Basic Algorithms including Numerical Algorithms Week 7 :  Functions and Parameter Passing by Value Week 8 :  Passing Arrays to Functions, Call by Reference Programming Assignment Week 9 :  Recursion Week 10 :   Structures and Pointers Week 11 :  Self-Referential Structures and Introduction to Lists Week 12 :   Advanced Topics

NOTE:  You can check your answer immediately by clicking show answer button. Problem Solving Through Programming In C NPTEL assignment answers ” contains 10 questions.

Now, start attempting the quiz.

Problem Solving Through Programming In C NPTEL assignment answers

Q1. Which among the following is the most complete definition of Programming?

a) Programming is a process to solve any logical problems. b) Programming is a process to solve any numerical problem c) Programming is a process to solve any real life problems. d) Programming is the process of taking an algorithm and encoding it into a notation (using a programming language), so that it can be executed by a computer.

Q2. Which of the following controls the way in which the computer system works and give means by which users can interact with the computer?

a) The motherboard b) The operating system c) The application software d) The RAM

Q3. CPU consists of

a) ALU, Control Unit b) ALU, Main memory, Control Unit c) ALU, monitor, Registers d) ALU, Control Unit, Hard Disk

Q4. C was developed by

a) Alan Turing b) Charles Babbage c) Ada Lovelace d) Dennis Ritchie

a) General-purpose programming language b) Domain-specific programming language c) Page description programming language d) None of the above

Q6. The relation between bit and byte in digital logic is

a) 1 byte = 10 bits b) 1 byte = 16 bits c) 1 byte = 8 bits d) 1 byte = 2 bits

Answer: c) 1 byte = 8 bits

Q7. Which of the following is not a programming language?

a) C b) Unix c) Java d) Python

Q8. The binary AND operation of the numbers “100101” and “110011” results (in decimal)

a) 100001 b) 2 c) 33 d) 63

Q9. Which of the following is not an input device of computer?

a) Printer b) Mouse c) Keyboard d) Joystick

Q10. The process through which an user can find error(s) in a program is called

a) Compiling b) Searching c) Debugging d) Processing

>> Next- Problem Solving Through Programming In C Week 1 Assignment Solutions

Programming in Java NPTEL week 1 quiz answers

NPTEL answers: Programming in Modern C++

NPTEL – Python for Data Science assignment solutions

Nptel – Deep Learning assignment solutions

The above question set contains all the correct answers. But in any case, you find any typographical, grammatical or any other error in our site then kindly  inform us . Don’t forget to provide the appropriate URL along with error description. So that we can easily correct it.

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz. ## Related Posts

Html mcq : html basics (multiple choice question), html mcq : html web browsers (multiple choice question). ## C programming MCQ : Preprocessor Directives(MULTIPLE CHOICE QUESTION)

Save my name, email, and website in this browser for the next time I comment. ## Introduction to Programming in C

• What is an algorithmic solution to the problem?
• How do we translate the algorithm into C code?
• How efficient is the code?
• How maintainable is the code?
• Attempting algorithmic solutions to problems
• Designing and coding moderate sized programs running to the order of a few hundred lines of code, and
• Reading, understanding and modifying code written by others.

Note: This exam date is subjected to change based on seat availability. You can check final exam date on your hall ticket.

## Page Visits

Course layout, books and references, instructor bio. Course certificate.

• Assignment score = 25% of average of best 6 assignments out of the total 8 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  ## SWAYAM SUPPORT

Please choose the SWAYAM National Coordinator for support. * :

## NPTEL C Programming And Assembly Language Week 1 Assignment Answers 2023

NPTEL C Programming And Assembly Language Assignment Solutions 1. What are the values of the registers AX and BX after the following assembly code executes ? • AX=1, B X =1

2. What is the value of the zero flag at t h e end of this program’s execution 3. For the following instructions When MOV AL,01 is reac he d it is necessarily the case that CL= 0

4. Say the following 7 bytes are st o red in the extra segment with address of the last element 81 being stored at START_ADDR and the addresses increasing as you go up the list from the bottom up. Consider the following program to search f o r 47. What is the value of ECX wh e n REPNE SCASB finishes executing?

5. Say the opcode size of REP MOVSB is 1 byte and at present EIP=0x0F21 and ECX=09. The instruction REP MOVSB is executed. After the execution, we observe that CX=00. Then, EIP= _ ?

6. NOTE:- ECS=0x0141, EDS=0x160 0 , ESS=0x2512, EES=0x3509, EAX=0x0116, EBP=0x4567. Assume that there are two arrays as follows:- After the following s nipped code executes, what will be the values in Array-1, Array-2? 7. The value stored i n the registers EAX, EDX after the execution of the following code snippet is • EAX=06, EDX=00
• EAX=12, E DX=00
• EAX=06, EDX=02
• EAX=12, EDX=02

8. If EAX=0x2117, ECX=0x2434, ESS=0x1041 an d ESP=0xF612. Analyse the following assembly code snippet. What is the value of ESP after the following code executes? 9. If ECS=0x0141, EDS=0x1634, ESS=0x2512, EES=0x3 50 9, EAX=0x0116, EBP=0x4567, the Address accessed by the instruction [EAX+0x0026] is

10. The value stored in the ECX register after the above code snippet executes:

11. The value stored in the register EDI after the above code s nippet executes:

12. What is the value of the Direction Flag after the abov e code snippet executes

• Cannot s ay

Save my name, email, and website in this browser for the next time I comment.

• X-Ray Grid CodeChef Solution
• Squarified CodeChef Solution
• Unique xor CodeChef Solution
• Chandelier CodeChef Solution
• Divisible By 8 CodeChef Solution ## NPTEL Problem solving through Programming In C Assignment 5 Answers 2022

NPTEL Problem solving through Programming In C Assignment 5 Answers 2022 :- 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 NPTEL Problem solving through Programming In C Assignment 5 Answers 2022 ? If Yes You are in Our Great Place to Getting Your Solution, This Post Should be help you with the Assignment answer to the Nation al Programme on Technology Enhanced Learning  ( NPTEL ) Course “ NPTEL Problem solving through Programming In C Week 5  Solution 2022 ”

## NPTEL Problem solving through Programming In C

From My Side :

This course is aimed at enabling the students to : Formulate easy algorithms for arithmetic and investigative problems

• Translate the algorithms to programs (in C language)

Test and kill the programs and truthful syntax and investigative errors

• Implement conditional branching, iteration and recursion

Decompose a tortured into functions and synthesize a unmodified program using divide and conquer right of admission

• Use arrays, pointers and structures to formulate algorithms and programs

Apply programming to solve matrix adding occurring together and multiplication problems and searching and sorting problems

Apply programming to solve easy numerical method problems, namely rot finding of doing, differentiation of do something and easy integration

This course is aimed at enabling the students to. Formulate easy algorithms for arithmetic and rational problems. Translate the algorithms to programs (in C language) Test and execute the programs and precise syntax and logical errors.

10 Steps to Solving a Programming Problem. Read the difficulty at least three era (or however many makes you setting satisfying) Work through the shackle manually taking into account at least three sets of sample data. Simplify and optimize your steps. Write pseudocode. Translate pseudocode into code and debug.

• Formulate simple algorithms for arithmetic and logical problems
• Test and execute the programs and  correct syntax and logical errors
• Decompose a problem into functions and synthesize a complete program using divide and conquer approach
• Apply programming to solve matrix addition and multiplication problems and searching and sorting problems
• Apply programming to solve simple numerical method problems, namely rot finding of function, differentiation of function and simple integration

CRITERIA TO GET A CERTIFICATE

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.

• 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

## CHECK HERE OTHERS NPTEL ASSIGNMENTS ANSWERS

Below you can get your nptel problem solving through programming in c assignment 5 answers 2022 :.

Q1. Continue statement used

a) to continue to the next line of code b) to debug c) to stop the current iteration and begin the next iteration from the beginning d) None of the above statements are correct

Answer By SciShowEngineer Answer: c) to stop the current iteration and begin the next iteration from the beginning

Q2. What will be the output?

#include<stdio.h> int main() { if((0 && 1)||(1 && -1)) printf(“Condition is true.”); else printf(“Condition is false.”); return 0; } a) Condition is true b) Condition is false c) Compilation Error d) No output possible

Q3. Compute the printed value of i of the C program given below

#include<stdio.h>

int main() { int i = 0, j = 0; while(i<4, j<5) { i++; j++; } printf(“%d, %d\n”, i, j); return 0; } a) 4, 5 b) 4, 4 c) 5, 5 d) 0, 0

Q4. What will be the output?

int main() { switch(printf(“IIT”)) { default: printf(” Guwahati”); case 1: printf(” Delhi”); break; case 2: printf(” Kharagpur”); break; case 3: printf(” Madras”); break; } return 0; } a) IIT Delhi b) IIT Kharagpur c) IIT Madras d) IIT Guwahati

Q5. Find the output of the following C program.

int main() { int i = 0; if(i==0) { i = i + 1; break; } printf(“%d”, i); return 0; } a) 0 b) 1 c) No output d) Compiler error

Q6. What will be printed when the following code is executed?

int main() { int i=0; for(;i<=9;) { i++; printf(“%d”, i); } return 0; } a) 0 1 2 … 9 b) 0 1 2 … 10 c) 1 2 3 … 9 d) 1 2 3 … 10

Q7. What is the output of the below C program?

int main() { short int k=1, j=1; while(k <= 4 || j <=3) { k = k + 2; j += 1; } printf(“%d,%d”, k,j); return 0; } a) 5, 4 b) 7, 4 c) 5, 6 d) 6, 4

Q8. What will be the output?

int main() { int i=0; for(;;) { if(i==10) continue; printf(“%d”, ++i); } return 0; } a) 0 1 2 3 4 5 6 7 8 9 11 12 … infinite times b) 1 2 3 4 5 6 7 8 9 11 12 … infinite times c) Nothing will be printed d) Compilation Error

Q9. What will be the output?

int main() { int x=1; do { x++; continue; printf(“%d”, x); break; }while(x<=2); printf(“\nAfter loop x=%d”, x); printf(“\n”); return 0; } a) After loop x=1 b) 1 After loop x=2 c) 1 2 After loop x=3 d) After loop x=3

Q10. What will be the output?

int main() { int x; x = 4 > 8 ? 5 !=1 < 5 == 0 ? 1:2:3; printf(“%d”, x); return 0; } a) 1 b) 2 c) 3 d) Error

## Problem solving through Programming In C Week 5 Assignments Solutions

Write a C program to count total number of digits of an Integer number (N).

#include <stdio.h> int main() { int N; scanf(“%d”,&N); /*The number is accepted from the test case data*/

/* Complete the rest of the code. Please use the printf statements as below by just changing the variables used in your program

printf(“The number %d contains %d digits.”, N, count);

int num = N, count = 0; while(num > 0) { num = num / 10; count++; } printf(“The number %d contains %d digits.”, N, count); return 0; }

Write a C program to find sum of following series where the value of N is taken as input 1+ 1/2 + 1/3 + 1/4 + 1/5 + .. 1/N

#include<stdio.h> int main() { int N; float sum = 0.0; scanf(“%d”,&N); /*Read the value of N from test cases provided*/

/* Complete the program. Please use the printf statement given below:

printf(“Sum of the series is: %.2f\n”, sum);

for(int i=1; i<=N; i++){ sum += (float)1/i; } printf(“Sum of the series is: %.2f\n”, sum); return 0; }

Write a C program to print the following Pyramid pattern upto Nth row. Where N (number of rows to be printed) is taken as input. For example when the value of N is 5 the pyramid will be printed as follows ***** **** *** ** *

#include<stdio.h> int main() { int N; scanf(“%d”, &N); /*The value of N is taken as input from the test case */

for(int i=N; i>0; i–) { for(int j=1; j<=i; j++) { printf(“*”); } printf(“\n”); } return 0; }

Write a C program to find sum of following series where the value of N(odd integer number) is taken as input 12+32+52+…..+n2

#include<stdio.h> int main() { int n, sum=0; scanf(“%d”,&n); //Value of n is taken from the test cases

for(int i=1; i<=n; i=i+2){ sum += i*i; } printf(“Sum = %d”, sum);

return 0; }

Yhaa You have done it but next? if YOU Want to your Others NPTEL Problem solving through Programming In C Assignments Answers Then Follow US HERE and Join Telegram.

• INDIABIX Aptitude Questions and Answers
• How To Draw a Computer – 4 Ways Step By Step Guide

## You May Also Like

Nptel problem solving through programming in c assignment 10 answers 2022, nptel problem solving through programming in c assignment 2 answers 2022, nptel problem solving through programming in c assignment 4 answers 2022. #### IMAGES

1. NPTEL Programming in C++ Week 7 Quiz Assignment Answers || August 2020 || Swayam 2. Problem Solving Through Programming in C Week 12 || NPTEL || Assignment 3. Problem solving through Programming In C||WEEK- 2 Assignment Answers 2020 ||#NPTEL||#C||#SKumarEdu 4. Problem solving through Programming In C||WEEK-12 Quiz Assignment 5. Programming in C++ NPTEL week 7 Assignment + Programming Questions 2020 6. NPTEL » C Programming and Assembly Language Week 2 : Assignment 2 #### VIDEO

1. C

2. Problem solving through Programming In C||WEEK-12 Assignment Answers||#NPTEL||#SKumarEdu||#C

3. Introduction to Programming In C||WEEK-3 Assignment Answers||#NPTEL||#SKumarEdu||#cprogramming

4. NPTEL Programming In Modern C++ Week 6 Programming Assignment Solution

5. DAY 35

6. Important Question For Concept of Programming Using 'C

1. Assignment 1

2. PDF assessment id-33

Quiz : Assignment I Week I Feedback C Programming and Assembly Language Assignment I Solutions Week 2 week 3 Week 4 DOWNLOAD VIDEOS Assignment 1 The due date for submitting this assignment has passed. As per our records you have not submitted this assignment. Instructions: You are not required to know the instruction set offhand.

3. C Programming and Assembly Language

A brand new series from NPTEL is available from April 13, 2020 onward Dear learner, Hope all are at home, safe and well. ... C Programming and Assembly Language : Assignments 4 solutions are live now ! ... C Programming and Assembly Language: Steps to access the assignment through Mobile App ...

4. C Programming And Assembly Language

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. Read More.

5. NOC

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 ...

6. PDF Assignment 1

c) High-level language to machine level language d) Pseudo code to computer program No, the answer is incorrect. Score: 0 Accepted Answers: c) High-level language to machine level language Computer memory which is used to store programs and data currently being processed by CPU is a) ROM b) RAM c) Cache memory d) PROM No, the answer is ...

7. C Programming and Assembly Language

Dear Learner, Reevaluation has been done by adding an answer (assignment 1 Qn 6). ... The lecture videos for Week 2 have been uploaded for the course "C Programming and Assembly Language". The lectures can be accessed using the following link: ... C Programming and Assembly Language: Welcome to NPTEL Online Course - July 2022!! ...

8. C Programming and Assembly Language

The course is free to enroll and learn from. But if you want a certificate, you have to register and write the proctored exam conducted by us in person at any of the designated exam centres. The exam is optional for a fee of Rs 1000/- (Rupees one thousand only).Date and Time of Exams:Morning session 9am to 12 noon; Afternoon Session 2pm to 5pm ...

9.  C Programming and Assembly Language

NPTEL Assignment  C Programming and Assembly Language . Week  Comming Soon: Stay Tuned: Design by ...

10. NPTEL » C Programming and Assembly Language week 1 assignment 1 answer

NPTEL » C Programming and Assembly Language week 1 assignment 1 answer. NPTEL » C Programming and Assembly Language week 1 assignment 1 answer.

11. NPTEL Assignment

NPTEL Assignment.  Advanced Computer Architecture.  An Introduction to Programming through C++.  Applied Natural Language Processing.  Artificial Intelligence Search Methods For Problem Solving.  Blockchain Architecture Design and Use Cases.  C Programming and Assembly Language.  Cloud Computing.  Computer Vision.

12. [Week 1 to 4] NPTEL C Programming And Assembly Language Assignment

NPTEL C Programming And Assembly Language Week 4 Assignment Answers 2023. 1. By observing the compiled assembly output, the values of V3, V4, V5, and V6 respectively are. 2.

13. C Programming And Assembly Language

Students are requested to find their revised scores of Assignment 2 on the Progress page.-NPTEL Team. ... The lecture videos for Week 1 have been uploaded for the course "C Programming And Assembly Language". The lectures can be accessed using the following link: ... Anyone who knows the answers can reply to anyone's post and the course ...

14. Problem Solving Through Programming In C

Answers COMING SOON! Kindly Wait! Week 0 : Assignment. Week 1 : Introduction to Problem Solving through programs. Week 2 : Arithmetic expressions, Relational Operations, Logical expressions; Introduction to Conditional Branching. Week 3 : Conditional Branching and Iterative Loops. Programming Assignment. Week 4 : Arranging things : Arrays.

15. C Programming And Assembly Language Assignment 3 Answers 2022

C Programming And Assembly Language week 3 Assignment 3 Answers 2022 | NPTEL Solutions | Unique Jankari-----Answer Link:- h...

16. NPTEL :: Computer Science and Engineering

NPTEL provides E-learning through online Web and Video courses various streams. ... Courses; Contact us; Courses; Computer Science and Engineering; NOC:C Programming and Assembly Language (Video) Syllabus; Co-ordinated by : IIT Madras; Available from : 2019-07-25; Lec : 1; Modules / Lectures ... Week_01_Assignment_01: Week_01_Assignment_01 ...

17. NPTEL C Programming And Assembly Language Week 2 Assignment Answers 2023

Answer :- For Answer Click Here 4. What is the value in EAX when the program reaches statement 14?. Answer :- For Answer Click Here 5. If the instructions were executing on a 32-bit processor, what is the largest value one can assign to N in statement 3 such that the program reaches statement 14 without an overflow of the accumulator in statement 9? ...

18. PDF 03/07/2020 Problem solving through Programming In C

Due on 2020-04-22, 23:59 IST. 1) 1 p o i n t Assignment 12 The due date for submitting this assignment has passed. As per our records you have not submitted this assignment. Which of the following are themselves a collection of dif ferent data types? a) String b) Array c) Character d) Structure No, the answer is incorrect. Score: 0 Accepted ...

19. Introduction to Programming in C

The programming exam will have a weightage of 25% towards the Final score. Final score = Assignment score + Unproctored programming exam score + Proctored Exam score. Assignment score = 25% of average of best 6 assignments out of the total 8 assignments given in the course. ( All assignments in a particular week will be counted towards final ...

20. NPTEL C Programming And Assembly Language Week 1 Assignment Answers 2023

Answer :- For Answer Click Here. 4. Say the following 7 bytes are st o red in the extra segment. with address of the last element 81 being stored at START_ADDR and the addresses increasing as you go up the list from the bottom up. Consider the following program to search f o r 47.

21. NPTEL Problem solving through Programming In C Assignment 5 Answers

10 Steps to Solving a Programming Problem. Read the difficulty at least three era (or however many makes you setting satisfying) Work through the shackle manually taking into account at least three sets of sample data. Simplify and optimize your steps. Write pseudocode. Translate pseudocode into code and debug.