NIOS Class 12 Computer Science Chapter 15 Functions Solutions English Medium As Per New Syllabus. to each chapter is provided in the list so that you can easily browse throughout different chapters NIOS Class 12 Computer Science Chapter 15 Functions Notes and select need one. NIOS Class 12 Computer Science Question Answers Download PDF. NIOS Study Material of Class 12 Computer Science Notes Paper 330.
NIOS Class 12 Computer Science Chapter 15 Functions
Also, you can read the NIOS book online in these sections Solutions by Expert Teachers as per National Institute of Open Schooling (NIOS) Book guidelines. These solutions are part of NIOS All Subject Solutions. Here we have given NIOS Class 12 Computer Science Textbook Solutions, NIOS Senior Secondary Course Computer Science Notes for All Chapter, You can practice these here.
Functions
Chapter: 15
| Module – 3: Programming in C++ |
INTEXT QUESTIONS 15.1
1. Name the header file that is required for the following:
(i) abs ( )
Ans: math.h.
(ii) strcmp ( )
Ans: string.h
(iii) clrscr ( )
Ans: conio.h.
(iv) tolower ( )
Ans: ctype.h.
2. Fill in the blanks :
(a) All header files have an extension ____________ .
Ans: h.
(b) Character functions are available in ____________ header file.
Ans: Ctype.h.
(c ) The function toupper (c) converts C to ____________.
Ans: Uppercase.
(d) In strcpy (S1, S2) the string ____________ copies onto the string ____________.
Ans: S2, S1.
(e) The function which counts the length of the string is _____________.
Ans: Strlen ( ).
(f) The sin ( ) function is available in ________________ header file.
Ans: Math.h.
3. State whether the following statements are true or false:
(a) The isdigit ( ) function checks whether the entered character is digit or not.
Ans: True.
(b) All string functions are available in stdio.h.
Ans: False.
(c) The iostream.h contains all input/output functions.
Ans: True.
(d) The tolower (C) converts C to lowercase.
Ans: True.
(e) Strcat (S1, S2) splits two strings into three strings.
Ans: False.
(f) Pow (x, y ) calculates y to the power x.
Ans: False.
(g) Cos (x) returns the cosine of angle (x).
Ans: True.
(h) Tolower ( ) function is available in ctype.h.
Ans: True.
(i) The log (x) is available in string.h.
Ans: False.
INTEXT QUESTIONS 15.2
1. What will be the output of the following programs?
(a) # include < iostream.h>
void add (float); void main ( )
{
float x = 5.0;
add (x);
cout << x ;
}
void add (float x)
{
x = x + 2;
}
Ans: 5.
(b) # include < iostream.h >
void add (float);
float x = 5.0;
void main ( )
{
add (x);
cout << x ;
}
void add (float x)
{
x = x + 2;
}
Ans: 5.
(c) # include < iostream.h >
float add (float);
void main ( )
{
float x = 5.0;
float y;
y = add (x);
cout << x << ” ” << y < < “\n”
}
float add (float x)
{
return (x +2);
}
Ans: 5 7.
(d) # include < iostream.h >
void P1 (int &, int);
void main ( )
{
int a = 5;
int b = 6;
cout << “output of the program \n”;
cout << “values of a and b are “ << a << b << “\n”;
P1 (a, b);
cout << “values of a and b are” << a << b;
}
void P1 (int & a, int b)
{
a = 7 ;
b = 10 ;
}
Ans: output of the program values of a and b are 5 6 values of a and b are 7 6.
2. Fill in the blanks:
(a) Any C++ program contains at least ____________ function(s).
Ans: 1.
(b) After each function has done a job, control returns to ____________.
Ans: Statement after calling function statement.
(c) The declaration of a function in the calling program is known as a function ____________.
Ans: Prototype.
(d) In a program, the function can be called in two ways ____________ and ____________.
Ans: Call by value call by reference.
(e) When the return type is not specified, the default return type of function is ____________ .
Ans: Int.
(f) To return the control back to the calling function, we use the keyboard ____________.
Ans: Return.
(g) In an ____________ function, looping is not allowed.
Ans: Inline.
Subject Ka Complete Video Solution Dekhein
Step-by-step easy concept explanation aur full questions Answer ke liye watch karein ya app download karein:

