NPTEL Problem solving through Programming In C Assignment 7 Answers 2021:- We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.
Q1. In C, the placement of elements of a two dimensional array is
(a) Row wise
(b) Column wise
(c) Diagonal wise
(d) Bottom to top wise
Ans:- (a) Row wise
Q2. Array passed as an argument to a function is interpreted as
(a) Address of the array
(b) Value of the first element of the array
(c) Address of the first element of the array
(d) Number of element of the array
Ans:- (b) Value of the first element of the array
NPTEL ALL WEEK ASSIGNMENT ANSWERS:-
- Soft Skill Assignment Answers
- Project Management For Managers Answer
- Semiconducter Devices And Circuit Answer
- Problem Solving Through Programming In C Answer
Q3. Applications of multidimensional array are?
(a) Matrix-Multiplication
b) Minimum Spanning Tree
(c) Finding connectivity between nodes
(d) All of the mentioned
Ans:- For Answer Click Here
Q4. What will be the output?
#include <stdio.h>
int main()
{
char str1[] = "Week-7-Asignment"; char str2[] = {'W','e','e','k','-', '7','-','A','s','s','i','g','n','m','e','n','t'};
int nl = sizeof(str1)/sizeof(str1[0]);
int n2 = sizeof(str2)/sizeof(str2[0]);
printf("nl=%d, n2 =%d", nl, n2);
return 0;
}
a) n1 = 18, n2 = 17
b) n1 = 18, n2 = 18
c) n1 = 17, n2 = 17
d) n1 = 17, n2 = 18
Ans:- c) n1 = 17, n2 = 17
ALSO READ : NPTEL – Online Courses,Certificate And full details
Q5. What is the output of the following C code?
#include <stdio.h>
int main()
{
int ary[2][3];
ary[][]={{1, 2, 3}, {4, 5, 6}};
printf("%d\n", ary[1][0]);
return 0;
}
a) Compile time error
b) 4
c) 1
d) 2
Ans:- a) Compile time error
Q6. 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];
p[i] = p[j-i];
p[j-i] = t;
}
printf("%s", p);
return 0;
}
a) assignment
b) tnemngissa
c) nothing will be printed
d) tttttttttt
Ans:- c) nothing will be printed
Q7. What Will be the output?
#include <stdio.h>
int main()
{
int a[2][3] = {1,2,3,4};
int i = 0, j = 0;
for(i=0; i < 2; i++)
for (j=2; j>=0; j--)
printf("%d", a[i][j]);
return 0;
}
Ans:- 321004
Q8. What will be the output?
#include<stdio.h>
#include<string.h>
int main()
{
char str1[20] = "hello", str2[20] = "world";
printf("%s", strcpy(str2, strcat(str1, str2)));
return 0;
}
a) hello
b) world
c) world hello
d) hello world
Ans:- d) hello world
Q9. What will be the output?
#include<stdio.h>
int main()
{
int i;
char a[]="";
if(printf("%s",a))
printf("The string is empty");
else
printf("The string is not empty");
return 0;
}
a) The string is empty
b) The string is not empty
c) Error
d) None
Ans:- b) The string is not empty
NPTEL ALL WEEK ASSIGNMENT ANSWERS:-
- Soft Skill Assignment Answers
- Project Management For Managers Answer
- Semiconducter Devices And Circuit Answer
- Problem Solving Through Programming In C Answer
Q10. What is the output of the following C program?
#include <stdio.h>
#include <ctype.h>
int main()
{
int i = 0;
char c;
char str[] = "Programming Language";
while(str[i]!='';
{
putchar (toupper(str[i]));
i++;
}
return 0;
}
a) Programming
b) PROGRAMMING LANGUAGE
c) PROGRAMMING
d) Syntax error
Ans:- For Answer Click Here
NPTEL Problem solving through Programming In C Assignment 7 Answers 2021:- We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.
NPTEL Problem solving through Programming In C Assignment 6 Answers
SOFT SKILLS WEEK 7 ASSIGNMENT ANSWERS (NPTEL)
Marketing Management – I Assignment 2 Answers 2021
Big Data Computing Assignment 2 Answers 2021
Developing Soft Skills and Personality Assignment 2 Answers Q11 to Q25
Developing Soft Skills and Personality Assignment 2 Answers Q1 to Q10