adplus-dvertising
Q1. Which of the following statements are correct? i. A string is a collection of characters terminated by 10′. ii. The format specifier %s is used to print a string. iii. The length of the string can be obtained by strlen(). iv. The pointer cannot work on string a. i, ii b. i, ii, iii c. ii, iv d. i, iii Answer By SciShowEngineer: b. i, ii, iii For More Updates Follow Us on Telegram Q2. The right method of initializing a 2D array is a. int abc[2][2] = {1, 2, 3, 4} b. int abc[][] = {1,2,3,4} c. int abc[2][] = {1,2,3,4} d. all of the above Answer By SciShowEngineer: a. int abc[2][2] = {1, 2, 3,4} Q3. The array passed as an argument to a function is interpreted as a. Address of all the elements in an array b. Value of the first element of the array c. Address of the first element of the array d. Number of elements of the array Answer By SciShowEngineer: c. Address of the first element of the array Q4. What will be the output? #include int main() { int disp[3][4]={{5, 6,8,2},{4,5,3,7}, {1,10,13,15}}; printf("%d\n",disp[2][3]); return 0; } Answer By SciShowEngineer: 15 Q5. What will be the output? #include int main() { char str1[]="Live and let live";char str2[]={'L', 'ï', 'v', 'e', ' ', 'a', 'n', 'd', ' ', 'l', 'e', 't',' ','l', 'i', 'v', 'e'}; int n1= sizeof(str1)/sizeof(str1[0]); int n2= sizeof(str2)/sizeof(str2[0]); printf("n1=%d, n2=%d",nl,n2); return 0; } a. n1=18, n2=17 b. n1=18, n2=18 c. n1=17, n1=17 d) n1=17, n2=18 Answer By SciShowEngineer: a. n1=18, n2=17 Q6. What will be the value of ‘i’ after the execution of the C code fragment given below? static char str1[]="dills"; static char str2[20]; static char str3[]="daffo"; int i; i=strcmp(strcat(str3, strcpy(str2,str1)),"daffodills"); Answer By SciShowEngineer: 0 Q7. Consider the following C program segment: #include #include int main() { char p[20]; char s[]="string"; int length=strlen(s); int i; for(i=0;i

NPTEL Problem solving through Programming In C Assignment 7 Answers 2022

NPTEL Problem solving through Programming In C Assignment 7 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 7 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 National Programme on Technology Enhanced Learning (NPTEL) Course “NPTEL Problem solving through Programming In C WeekSolution 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.

This course is aimed at enabling the students to :
  • Formulate simple algorithms for arithmetic and logical problems
  • Translate the algorithms to programs (in C language)
  • Test and execute the programs and  correct syntax and logical errors
  • Implement conditional branching, iteration and recursion
  • Decompose a problem into functions and synthesize a complete program using divide and conquer approach
  • Use arrays, pointers and structures to formulate algorithms and programs
  • 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
INTENDED AUDIENCE : BE/BTech  in all disciplines BCA/MCA/M. Sc
INDUSTRY SUPPORT   : All IT Industries

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.

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 Problem solving through Programming In C Assignment 7 Answers 2022? :

 

NPTEL Problem solving through Programming In C Assignment 7 Answers 2022

1. Which of the following statement/s are false?

I. Array elements are stored in memory in contiguous locations.
II. An integer array always terminates with \0° (NULL).

Answer:- b
2. If two strings are identical, then stremp) function returns

Answer:- 0

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

Problem Solving Through Programming In C Assignment 7 Answers 2022
3. Which of the following function is more appropriate for reading in a multi word string?

a) scanf ()
b) gets ()
c) printf ()
d) puts ()

Answer:- b
4. What will be printed after execution of the following code?

#include<stdio.h>
int main(0 int a[20] {10, 20, 30, 40,50,60 };
printf(“%d”, 3[al);
return 0;

Answer:- 40
5. What will be the output of the program?

#include<stdio.h>
int main ()
{
char str[]=”Arrayi0string”;
printf(“%s”, str);
return 0;
}

Answer:- a
6. What will be the output?

#include<stdio.h>
#include<string.h>
int main()
{
char str1[20] = “Programming”, str2[20] = “Language”;
printf(“6s”, strepy(str2, strcat(strl, str2));
return 0;
}

Answer:- c

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

Problem Solving Through Programming In C Assignment 7 Answers 2022

7. What will be the output?

#include <stdio.h>
int main()
{
char str1[= “I-LOVE-C”;
char str2]= {T,”, L, ‘O’, V’, E’, “,’C};
int nl = sizeof(str1)/sizeof(str1|0);
int n2= sizeof(str2)/sizeof(str2|0);
printf”nl=%d, n2=9%d”, nl, n2);
return 0;
}
Answer:- d
8. What will be the output?

#include <stdio.h>
int main()
{
int i, m=l, um|6] ={1,2,3,4,5,6};
for(i-0; i=5; it+)
m=m*num[i];
printf(” 6d”, m);
return 0;
}
Answer:- 720
9. What will be the output?

#include<stdio.h>
#include<string.h>
int main()
{
char p[] = “assignment”;
char t;
int i, j;
for(i-0, j=strlen(p); i<j: i++)
t p[i];
Plpli-i
Pj-i] = t;
printf(“6s”, p);
return 0;
}
Answer:- c

10. What will be the output?

#include<stdio.h>
#include string.h>
int main ()
{
char p[]= “welcome”, q[=”weleome”;
if(p=q)
printf(“Two strings are equal”);
return 0;
}
Answer:- c

 

Related Posts

Leave a Reply

Your email address will not be published.