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/10/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.
What is scope resolution operation?
2.
Write a program using pow( ) and sin( ) function.
3.
What is isdigt ( )? Give example
4.
What is divide and conquer?
5.
What is default arguments? Give example.
6.
What are the information the prototype provides to the compiler?
7.
Write short note on pow() function in C++.
8.
Write about strcmp() function.
9.
What is the difference between isupper() and toupper() functions?
10.
What is Built-in functions?
1.
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.
2.
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
3.
This function is used to check whether a given character is a digit or not. This function will return 1 if the given character is a digit, and 0 otherwise.
Example:
using namespace std;
#include< iostream >
#include< ctype.h >
int main( )
{
char ch;
cout < < "m Enter a Character:";
cin > > ch;
cout< < "\n The Return Value of isdigit(ch) is :"<< isdigit(ch);
}
Output-1
Enter a Character: 3
The Return Value of isdigit( ch) is :1
Output-2
Enter a Character: A
The Return Value of isdigit(ch) is :0
4.
Divide and Conquer
1. Complicated programs can be divided into manageable sub programs called functions.
2. A programmer can focus on developing, debugging and testing individual functions.
3. Many programmers can work on different functions simultaneously.
5.
In C++, one can assign default values to the formal parameters of a function prototype. The Default arguments allows to omit some arguments when calling the function.
When calling a function,
For any missing arguments, complier uses the values in default arguments for the called function.
i. The default value is given in the form of variable initialization.
Example: void defaultvalue(int n1-10. n2=100);
ii. The default arguments facilitate the function call statement with partial or no arguments.
Example: defaultvalue(x,y);
defaultvalue(200,150);
defaultvalue(150);
defaultvalue(x,150);
iii. The default values can be included in the function prototype from right to left, ie, we cannot have a default value for an argument in between the argument list.
Example: void defaultvalue(int n1-10, n2);//invalid prototype
void defaultvalue(int n1, n2 = 10);//valid prototype
6.
(i) The return value of the function is of type long.
(ii) fact is the name of the function.
(iii) The function is called with two arguments:
The first argument is of int data type.
The second argument is of double data type.
int display(int, int) // function prototype
The above function prototype provides details about the return data type, name of the function and a list of formal parameters or arguments.
7.
The pow() function returns base raised to the power of exponent. If any argument passed to pow() is long double, the return type is promoted to long double. If not, the return type is double. The pow() function takes two arguments.
(i) base- the base value
(ii) exponent - exponent of the base
Example :
cout <<pow(5,2);
output
25
8.
The strcmp () function takes two arguments: string 1 and string 2. It compares the contents of string 1 and string 2 lexicographically.
The strcmp() function returns a:
(i) Positive value if the first differing character in string 1 is greater than the corresponding character in string 2. (ASCII values are compared).
(ii) Negative value if the first differing character in string 1 is less than the corresponding character in string 2.
(iii) 0 if string 1 and string 2 are equal.
9.
| isupper() | toupper() |
|---|---|
| This function is used to check the given character is upper case | This function is used to convert the given character into its uppercase |
| This function will return 1 if true otherwise 0 |
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. |
| Example: isupper('a') will return 0 | Example: toupper('a') will return 'A'. |
10.
C++ provides a rich collection of functions ready to be used for various tasks. The tasks to be perfornned by each of these are already written, debugged and compiled, their definitions alone are grouped and stored in files called header files. Such ready-touse sub programs are called pre-defined functions or build-in functions.
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