11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil இயற்கை வேளாண்மை,சுற்றுச்சூழல் -செய்யுள் - மனோன்மணீயம் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil என்னுயிர் என்பேன் -துணைப்பாடம் - இசைத்தமிழர் இருவர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மொழி கலை -செய்யுள் - ஒவ்வொரு புல்லையும் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - இலக்கணம் - பகுபத உறுப்புகள் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - துணைப்பாடம் - வாடிவாசல் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - குறுந்தொகை Important Questions And Answers Study Material - QB365 Set A

Published on: 14/12/2019
Functions
Download Tamil Nadu 11th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
How the strings are compared using strampc?
ASCII values
EBCDIC values
BCD values
UNICODE
2.
toupper() belongs to _______.
type.h
string.h
iostream.h
manip.h
3.
A header file can be identified by .................
.cpp
.obj
.h
.exe
4.
Which of the following provides function prototype and library functions definitions?
Header file
C++ program file
user-define functions
built-in functions
5.
Which of the following statement is (are) false?
(i) complicated programs cannot be divided
(ii) It is easier the test, debug the functions
(iii) Programmers can not work on different-functions simultaneously
only (ii)
only (iii)
both (ii) and (iii)
both (i) and (iii)
6.
What is the purpose of using return statement?
7.
What is the use of in line function?
8.
Differentiate strcpy() and strcat() function
9.
What is the function of getchar () and putchar() function?
10.
Name any four functions belongs to stdio.h?
11.
What is scope resolution operation?
12.
Write a program using pow( ) and sin( ) function.
13.
Define library functions.
14.
Which function is used to convert the given character into its uppercase? Give example.
15.
Write a C++ program to find area a circle.
16.
Explain about address method.
17.
Explain about Inline functions with a suitable program.
18.
Explain the use of scope resolution operator with an example
19.
Explain Inline function with an example
1.
(a)
ASCII values
2.
(a)
type.h
3.
(c)
.h
4.
(a)
Header file
5.
(a)
only (ii)
6.
Returning from the function is done by using the return statement. The return statement stops execution and returns to the calling function. When a return statement is executed, the function is terminated immediately at that point.
7.
Inline functions can be used to reduce the overheads likes STACKS for small function definition.
8.
| Strcpy () | Strcat () |
|---|---|
| The strcpy ( ) function takes two arguments target and source. It copies the character string pointed by the source to the memory location pointed by the target. The null terminating character (10) is also copied. |
The strcat ( ) function takes two arguments: target and source. This function appends copy of the character string pointed by the source to the end of string pointed by the target. |
9.
The predefined function getchar() is used to get a single character from keyboard and putchar() functions is used to display it.
10.
getchar(), putchar(), gets(), puts()
11.
1. The scope operator reveals the hidden scope of a variable. The scope resolution operator (::) is used for the following purposes.
2. To access a Global variable when there is a Local variable with same name. An example using Scope Resolution Operator.
12.
The pow() function returns base raised to the power of exponent. The sint) function takes a single argument in radians.
#include < iostream >
#include < math.h >
using namespace std;
int main ( )
{
double base, exponent, result;
base = 5;
exponent = 4;
result = pow(base, exponent);
cout < < "pow("< < base < <"˄" < < exponent < <") =" < < result;
double x = 25;
result = sin(x);
cout < < "\nsin("< < x < <")=" < < result;
return 0;
}
Output:
pow(5^4) = 625
sin(25)= -0.132352
13.
C++ provides rich collection of functions ready to be used for various tasks. The tasks to be performed by each of these are already written, debugged and compiled, their definitions alone are grouped and tored in files called header files. Such ready-to-use sub programs are called pre-defined functions Of built-in functions or Library Functions.
14.
toupper(): This function is used to convert the given character into its uppercase. This function will return the uppercase equivalent of the given character. If the given character itself is in upper case, the output will be the same
Syntax:
char toupper( char c);
The following statement will assign the character constant 'K' to the variable c.
char c = toupper('k');
15.
#include < iostream >
using namespace std;
double area(const double r,const double pi=3.14)
{
return(pi*r*r);
}
int main 0
{
double rad,res;
cout << "\nEnter Radius :";
cin >> rad; .
res=area(rad);
cout << "\nThe Area of Circle =" << res;
return 0;
}
Output:
Enter Radius :5
The Area of Circle =78.5
16.
This method copies the address of the actual argument into the formal parameter. Since the address of the argument is passed, any change made in the formal parameter will be reflected back in the actual paratneter.
#include< iostream >
using namespace std;
void display(int & x) //passing address of a//
{
x=x*x;
cout< < "\n\n The Value inside display function (n1 x n1) :"< < x;
}
intmain ( )
{
int n1;
cout< < "\n Enter the Value for N1 :";
cin > > n1;
cout< < "\n The Value of N1 is inside main function Before passing:"< < n1;
display( n1);
cout< < "\n The Value of N1 is inside main function After passing (n1 x n1):"< < n1; return(0);
}
Output:
Enter the Value for N1 :45
The Value of N1 is inside main function Before passing: 45
The Value inside display function (n1 x n1) : 2025
The Value of N1 is inside main function After passing (n1 xn1) : 2025
17.
An inline function looks like normal function in the source file but inserts the function's code directly into the calling program. To make a function inline, one has to insert the keyword inline in the function header.
#include < iostteam >
using name space std;
inline float simple interest(float p1, float n1, float r1)
{
float si1=(p1*n1*r1)/100;
return( si 1);
}
int main ( )
{
float si.p.n,r;
cout < < "\0 Enter the Principle Amount Rs. :";
cin > >p;
cout < < "\0 Enter the Number of Years :";
cin > > n;
cout < < "\0 Enter the Rate ofInterest :";
cin > > r;
si=simple interest(p,n,r);
cout < < "\n The Simple Interest = Rs."< < si;
return 0;
}
Output:
Enter the Principle Amount Rs. :60000
Enter the Number of Years :10
Enter the Rate of Interest :5
The Simple Interest = Rs. 30000
18.
The scope operator reveals the hidden scope of a variable. The scope resolution operator (::) is used for the following purposes. To access a Global variable when there is a Local variable with same name. An example using Scope Resolution Operator.
// Program to show that we can access a global variable
// using scope resolution operator :: when there is a local
// variable with same name //
#include< iostream >
using namespace std;
int x=45; // Global Variable x
int main()
{
int x = 10; // Local Variable x
cout << "\nValue of global x is " << ::x;
cout << "\nValue oflocal x is" << x;
return 0;
}
Output:
Value of global x is 45 .
Value of local x is 10
19.
Inline functions can be used to reduce the overheads like STACKS for small function definition.
An inline function looks like normal function in the source file but inserts the function's code directly into the calling program. To make a function inline, one has to insert the keyword inline in the function header.
Syntax:
inline retuntype functionname( datatype parametemame1, ... datatype parametemameN)
Advantages of inline functions: Inline functions execute faster but requires more memory space. Reduce the complexity of using STACKS.
Example:
#include< iostream >
using namespace std;
inline float simpleinterest(float.pl, float nl, float rl)
{
float si 1=(p1*n1*r1)/100;
retumf si 1);
}
intmain0
{
float si.p,n,r;
cout<< "\nEnter the Principal Amount Rs.:";
cin> p;
cout<< "\nEnter the Number of Years :";
cin<< n;
cout << "\nEnter the Rate ofInterest :";
cin>> r:
si=simpleinterest(p,n,r) ;
cout<< "\nThe Simple Interest = Rs."<< si;
return 0;
}
11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - காவடிச்சிந்து Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - உரைநடை - மலை இடப்பெயர்கள் : ஓர் ஆய்வு Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - துணைப்பாடம் - யானை டாக்டர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - செய்யுள் - ஐங்குறுநூறு Important Questions And Answers Study Material - QB365 Set A
Tamilnadu Stateboard 11th Standard Subjects

Maths

Commerce

Economics

Biology

Business Maths and Statistics

Accountancy

Computer Science

Physics

Chemistry

Maths

Biology

Economics

Physics

Chemistry

History

Business Maths and Statistics

Computer Science

Accountancy

Computer Applications

History

Computer Technology

Commerce

Computer Applications

Computer Technology

Tamil

English

French
Tamilnadu Stateboard Standards