11th Standard Syllabus & Materials
11th Standard
TN 11th English Supplementary - 3 - The First Patient (Play) Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th English Prose - 3 - Forgetting Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th English Prose - 2 - The Queen of Boxing Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th English Poem - 1 - Once Upon A Time Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th English Prose - 1 - The Portrait of a Lady Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th Computer Applications Tamil Computing Sample Question Papers Study Material - QB365 Set A

Published on: 09/06/2021
QB365 provides detailed and simple solution for every book back questions in class 11 Computer Science subject.It will helps to get more idea about question pattern in every book back questions with solution.
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.
Write a program to accept any integer number and reverse it.
2.
Explain scope of variable with example.
3.
What are the different forms of function return? Explain with example.
4.
What is Recursion? Write a program to find the factorial of the given number using recursion.
5.
1.
#include<iostream>
using namespace std;
int reverse (int n);
int main()
{
int n=0, result = 0;
cout<<"Enter number:"";
cin >>n;
result reverse (n);
cout<<"Reverse number is:" << result << endl;
}
int reverse (int n)
{
int temp=0, rev = 0;
while (n! =0).
{
temp=n;
rev= (rev*10) + temp;
n = n/10;
}
return rev;
}
Output:
Enter number: 1 2 3
Reverse number: 3 2 1
2.
Scope refers to the accessibility of a variable.
There are four types of scopes in C++
(i) Local Scope
(ii) Function Scope
(iii) File Scope
(iv) Class Scope
(i) Local Scope
1. A local variable is defined within a block. A block of code begins and ends with curly braces {}.
2. The scope of a local variable is the block in which it is defined.
3. A local variable cannot be accessed from outside the block of its declaration.
4. A local variable is created upon entry into its block and destroyed upon exit;
Example:
int main()
{
int a,b; //Local variable
}
(ii) Function Scope
1. The scope of variable within a function is extended to the function block and all sub-blocks therein.
2. The lifetime of a function scope variable is the lifetime of the function block.
Example:
int sum(intx, int y); //x and y has function scope.
(iii) File Scope
1. A variable declared above all blocks and functions (including main()) has the scope of a file.
2. The lifetime of a file scope variable is the lifetime of a program.
3. The file scope variable is also called as global variable.
Example:
#include<iostream>
using namespace std;
int x,y; // x and y are global variable
void main()
{
,,,,,
}
(iv) Class Scope
1. Data members declared in a class has the class scope.
2. Data members declared in a class can be accessed by all member functions of the class.
Example:
Class example
{
int x,y; //x and y can be accessed by print() and void():
void print():
void total();
};
3.
The return statement
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. The return statement is used to return from a function. It is categorized as a jump statement because it terminates the execution of the function and transfer the control to the called statement.
Syntax:
return expression/variable;
Example: return(a+b); return(a);
return; // to terminate the function
The Returning values:
The functions that return no value is declared a void. The data type of a function is treated as int, if no data type is explicitly mentioned. For example,
For Example:
int add (int, int);
add (int, int);
In both prototypes, the return value is int, because by default the return value of a function in C++ is of type int.
Returning Non-integer values
A string can also be returned to a calling statement.
#include <iostream>
#include<string.h>
using namespace std;
char*display()
{
return ("chennai");
}
int main()
{
char s[50];
strcpy(s,display());
cout<<"\n Example:Function with Non Integer Return"<<s;
return(0);}
Output:
Example: Function with Non Integer Return Chennai
The Returning by reference
#include<iostream>
using namespace std;
int main()
{
int nl-150;
int &nlrefn1;
cout<<"\nThe Value of NI =" <<n<< "and nl Reference="<<n/ref;
n1ref++;
cout<<"\n After nl increased the Value of N1 ="<<nl;
cout<<"and nl Reference="<<ntref;
return(0);
Output:
The Value of N1 - 150 and n1 Reference - 150
After n1 increased the Value of N1 =151 and n1 Reference = 151
4.
A function that calls itself is known as recursive function. And, this technique is known as recursion.
#include
int factorial(int);//Function prototype//
int main ()
{
int no;
cout <<"\nEnter a number to find its factorial;";
cin>>no;
cout <<"\nFactorial of Number" < return 0;
}
int factorial(int m)
{
if (m>1)
{
return m*factorial(m-1);
}
else
{
return 1;
}
}
Output:
Enter a number to find its factorial: 5
Factorial of Number 5 = 120
5.
11th Standard Syllabus & Materials
11th Standard
TN 11th Computer Applications Computer Ethics and Cyber Security Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th Computer Applications JavaScript Functions Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th Computer Applications Control Structure in JavaScript Sample Question Papers Study Material - QB365 Set A
NEW11th Standard
TN 11th Computer Applications Introduction to JavaScript Sample Question Papers 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