TN Board 12th Computer Science Important Questions Chapter 14 Importing C++ Programs in Python

TN State Board 12th Computer Science Important Questions Chapter 14 Importing C++ Programs in Python

Question 1.
What is a script language?
Answer:
A script language is a programming language for integrating and communicating with other programming language.

Question 2.
Write some of the most widely used script language?
Answer:
JavaScript, VBScript, PHP, Perl, Python, Ruby, ASP AND TCI.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 3.
What is called Garbage collection?
Answer:

  1. Python deletes unwanted objects (built- in types or class instances) automatically to free the memory space.
  2. The process by which python periodically frees and reclaims blocks of memory that no longer are in use is called Garbage collection.

Question 4.
What is a g++?
Answer:
g++ is a program that calls GCC (GNU C Compiler) and automatically links the required C++ library files to the object code.

Question 5.
What is the use ‘+’ in os.system ()?
Answer:
‘+’ in os.system ( ) indicates that all strings are concatenated as a single string and send that as a List.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 6.
What purpose of using GNUC compiler?
Answer:
g++ is a program that calls GCC (GNUC Compiler) and automatically links the required C++ library files to the object code.

Question 7.
What is a command for wrapping C++ code?
Answer:
if _name_ = = ‘_main_’:
main (Sys. argv [1:])

Question 8.
Write the syntax of os.system ( ).
Answer:
The syntax of os.system ( ) is
os.system (‘g++’ + <variable_namel>
‘ – <mode>’ + <variable_name 2>)

Question 9.
Write the syntax of getopt ( ).
Answer:
The syntax of getopt ( ) is
<opts>, <args> = getopt. getopt (argv, options, [long_options])

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 10.
Differentiate static and dynamic language.
Answer:

Static Dynamic
A static typed language like C++ requires the programmer to explicitly tell the computer what data type, each data value is going to use. A dynamic typed language like python does not require the data type to be given explicitly for the data. Python manipulate the variable based on the type of value.

Question 11.
Write the steps to executing C++ program through python.
Answer:

  1. Double click the run terminal of MinGW.
  2. Go to the folder where the python software is located, For example Python is folder is located in.
  3. c:\program files\open office 4\python

Question 12.
Write the modular program in python to find factorial of given number.
Answer:
def fact (n):
f= 1
if n == 0:
return 0
elif n = 1:
return 1
else :
for i in range (1, n+1):
f=f*i
print (f)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 13.
Write a note on main (sys.argv [1]).
Answer:

  1. main (sys.argvfl]) – Accepts the python program and input file (C++ file) as a list (array).
  2. argv [0] contains the python program which is need not to be passed because by default _main_ contains source code reference
  3. argv [1] contains the name of the C++ file which is to be processed.

Question 14.
What are the commonly used interfaces when importing C++ files in python?
Answer:

  1. Python-C-API: (API-Application Programming Interface for interfacing with C programs)
  2. Ctypes (for interfacing with c programs)
  3. SWIG (Simplified Wrapper Interface Generator- Both G and C++)
  4. Cython (Cython is both a Python-like language for writing C-extensions)
  5. Boost.Python (a framework for interfacing Python and C++)
  6. MinGW (Minimalist GNU for Windows)

Question 15.
Write the syntax of os,system ()? Explain the arguments.
Answer:
The os module allows you to interface with the windows operating system where python is running on.
The syntax is
os.system (‘g++’ + <variable__namel> ‘-<mode>’ + <variable_name2>
Where
os.system – function system (defined in os module).
g++ – General compiler to compile C++ program under windows operating system.
Variable_name1 – Name of the C++ file without 1 extension.cpp in string format.
mode – To specify input or output mode. Here it is ‘mode’ prefixed with hyphen.
Variable_name2 – Name 0f the executable file without extension.exe in string format.
Eg:
os.system (‘g++’ + cpp_file + ‘-o’ + exe_file)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 16.
Write a C++ program to print Transpose of matrix (2D array). And save the file as transpose.py. Program that compile and execute in python.
Answer:
//Now select File→New in Notepad and type the C++ program.
#include <iostream>
using namespace std
int main( )
{
int a[3][3], i, j;
for(i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
cout<<“enter the value for array[“<<i+1 <<”]”<<“[“<<j+1<<”] :”;
cin>>a[i][j];
}
}
system(“cls”);
cout<<“\n\nOriginal Array\n”;
for(i=0; i<3; i++)
{
for(j=0; j<3; j++)
cout<,a[i][j]<<‘
cout<<endl;
}
cout<<“\n\n The Transpose of Matrix\n”;
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
cout<<a[j][i]<<‘ ‘;
cout<<endl;
}
return 0;
}
import sys, os, getopt
def main(argv):
cppjile = “
exefile – ”
opts, args – getopt.getopt(argv, “i:”,[‘ifile=’])
for o, a in opts:
if o in (“-i”, ifile”):
cpp_file = a+‘.cpp’
exe_file – a + ‘.exe’
run(cpp_file, exe_file)
def run(cpp_file, exe_file):
print(“Compiling ” + eppfile)
os.system(‘g++ ’ + cpp_file + ‘ -o ’ + exe_ file)
print(“Running ” + exefile)
print(“———-”)
print
os.system(exe_file)
print
if_name_main
main(sys.argv[l:])

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 17.
Write a C++ program containing functions and executing by python program.
Answer:
/*Write a C++ program using a user defined function to function cube of a number.*/

//Now select File—>New in Notepad and type the C++ program
#//include <iostream>
using namespace std;
// Function declaration
int cube(int num);
int main()
{
int num;
int c;
cout<<”Enter any number: “<<endl;
cin>>num;
c = cube(num);
Cout<<”Cube of “ <<num<< “ is “<<c;
return 0;
}
//Function to find cube of any number
int cube(int num)
{
return (num * num * num);
}

// Save this file as cubefile.cpp
#Now select File → New in Notepad and
type the Python program
# Save the File as fun.py
# Program that compiles and executes a .cpp file
# Python fun.py -i c:\pyprg\cube_file.cpp
import sys, os, getopt
def main(argv):
cpp_file =’ ‘
exe_file =‘ ’
opts, args – getopt.getopt(argv, “i:”,[‘ifile=’])
for o, a in opts:
if o in (“-i”, ifile”):
cpp_file = a + ‘.cpp’
exe_file = a + ‘.exe’
run(cpp_file, exe file)
def run(cpp_file, exe_file):
print(“Compiling “ + cppfile)
os.system(‘g++ ‘ + cpp_file + ‘ -o ‘ + exe_ file)
print(“Running “ + exe file)
print(“———-”)
print
os.system(exe_file)
print
if_name_==_main_’:
main(sys.argv[l:])
Output of the above program
Compiling e:\pyprg\cube_file.cpp
Running c:\pyprg\cube_file.exe
——————-
Enter any number:
5
Cube of 5 is 125

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 18.
Write a C++ program to implement multilevel inheritance of a class and executing by python program.
Answer:
// C++ program to implement Multilevel Inheritance
//Now select File—>New in Notepad and type the C++program
//include <iostream>
using namespace std;
#base class
class Vehicle
{
public:
Vehicle( )
{
cout<< “This is a Vehicle” <<endl;
}
};
class threeWheeler: public Vehicle
{public:
three Wheeler( )
{
cout<<”Objects with 3 wheels are vehicies”<<endl;
}
};
// sub class derived from two base classes
class Auto: public threeWheeler{
public:
Auto( )
{
cout<<”Auto has 3 Wheels”«endl;
}
};
// main function int main( )
{
//creating object of sub class will invoke the constructor of base classes
Auto obj;
return 0;
}
// Save this file as inheri cpp.cpp
//Now select File → New in Notepad and type the Python program
# Save the File as classpy.py
# Python classpy.py -i inheri_cpp command to execute C++ program
import sys, os, getopt
def main (argv):
cpp_file = ‘ ’
exe_file = ‘ ’
opts, args = getopt.getopt (argv, “i:”,[‘ifile=’])
for o, a in opts:
if o in (“-i”, “-ifile”):
cpp_ file = a + ‘.cpp’
exe_file = a + ‘.exe’
run (cpp_file, exefile)
def run(cpp_file, exe file):
print (“Compiling “ + cpp_file)
os.system (‘g++ ‘ + cpp_file + ‘ -o ‘ + exe_ file)
print (“Running “ + exe_file)
print (“————-”)
print
os.system (exe_file) print
if_name_==’_main_’:
main (sys.argv[1:])
Output of the above program
Compiling c:\pyprg\class_file.cpp
Running c:\pyprg\class_file.exe
—————-
This is a Vehicle
Objects with 3 wheels are vehicles
Auto has 3 Wheels

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 19.
What is the theoretical difference between Scripting language and other programming language?
Answer:

Scripting language

 Other languages (Programming language)

A script language requires an interpreters. Programming language requires a compiler.
A script language do not require the compilation step and are rather interpreted. But programming languages needs to be compiled before running.
Example: Javascript, python etc., Example: C++, COBOL etc.,

Question 20.
Differentiate compiler and interpreter.
Answer:

Compiler

 Interpreter

Compile the entire program and translates it as a whole machine code. Interpreter translates program one statement at a time.
It takes large amount of time to analyze the source code but execution time is faster. It takes less amount of time to analyze the source code, and execution time is slower.
Example for C, C++ use compilers. Example for python, Javascript use interpreters.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 21.
Write the expansion of
(i) SWIG
(ii) MinGW
Answer:
(i) SWIG – Simplified Wrapper Interface Generation.
(ii) MinGW – Minimalist GNU for windows.

Question 22.
What is the use of modules?
Answer:

  1. We use modules to breakdown large programs into small manageable and organized files.
  2. Modules provides reusability of code.
  3. We can define our most used functions in a module and import it, instead of copying their definitions into different programs.

Question 23.
What is the use of cd command. Give an example.
Answer:
In python use cd command Hold Shift + Right click in explorer in the folder where the python file is will create a proper path string for your OS.
Eg. Using cd command in python
>>>import OS
>>>OS.system (“cd c:\mydir”)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 24.
Differentiate PYTHON and C++.
Answer:

PYTHON

 C++

Python is typically an “interpreted” language. C++ is typically a “compiled” language.
Python is a dynamic typed language. C++ is compiled statically typed language.
Data type is not required while declaring variable. Data type is required while declaring variable.
It can act both as scripting and general purpose language. It is a general purpose language.

Question 25.
What are the applications of scripting language?
Answer:
Applications of scripting Languages:

  1. To automate certain tasks in a program.
  2. Extracting information from a data set.
  3.  Less code intensive as compared to traditional programming language..
  4. Can bring new functions to applications and give complex systems together.

Question 26.
What is MinGW? What is its use?
Answer:

  1. MinGW – (Minimalist GNU for windows), it refers to a set of runtime header files, used in compiling and linking the code of C,C++ and FORTRAN to be run on windows operating system.
  2. It uses to compile and execute the C++ program.
  3. MinGW allows to compile execute the C++ program dynamically through python program using g++.
  4. MinGW – W64 is the best compiler for C++ on windows.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 27.
Identify the module, operator, definition name for the following weleome.display ( )
Answer:
Welcome.display ( )
welcome – module
Dot – Dot operator
display ( ) – Function name

Question 28.
What is sys.argv? What does it contain?
Answer:

  1. sys.argv is the list of command – line arguments passes to the python program.
  2. argv contains all the items that come along via the command-line input, It’s basically an array holding the command-line arguments of the program.
  3. The first argument, sys.argv[0], is always the name of the program as it was invoked, and sys.argv [1] is the first argument you pass to the program.

Question 29.
Write any 5 features of Python.
Answer:
Features of Python over C++:

  1. Python uses Automatic Garbage Collection whereas C++ does not.
  2. C++ is a statically typed language, while Python is a dynamically typed language.
  3.  Python runs through an interpreter, while C++ is pre-compiled.
  4. Python code tends to be 5 to 10 times shorter than that written in C++.
  5. In Python, there is no need to declare types explicitly where as it should be done in C++.
  6. In Python, a function may accept an argument of any type, and return multiple values without any kind of declaration beforehand. Whereas in C++ return statement can return only one value.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 30.
Explain each word of the following command.
Answer:
Python <filename.py> -<i> <C++ filename
without cpp extension>

  1. Python – Keyword to execute the python program from command-line.
  2. filename.py – Name of the python program to executed.
  3. -i – input mode
  4. C++ filename without cpp extension- name of C++ file to be compiled and executed.

Question 31.
What is the purpose of sys,os,getopt module in Python.Explain.
Answer:
(i) sys module:
This module provides access to
some variables used by the interpreter and to functions that interact strongly with the interpreter, sys.argv is the list of command-line argument passed to the python program.

(ii) OS module:
The OS module in python provides a way of using operating system dependent functionality, os.system ( ) – execute the C++ compiling command in the shell.

(iii) get opt module:
The getopt module of python helps you to parse (split) command-line options and arguments.
getopt.getopt method parses command¬’ line options and parameter list.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 32.
Write the syntax for getopt( ) and explain its arguments and return values.
Answer:
The getopt module of python helps you to parse command-line options and arguments.
The syntax is
<opts>,<args> = getopt.getopt (argv, options, [long-options])
Where,
argv- This is the argument list of values to be parsed (splited).
In our program the complete command will be passed as a list.

Options:
This is string of options letters that the python program recognize as for input or for output with options (T or ‘0’) that follower by a colon (:).
Here colon is used to denote the mode.
long-options. This parameter is passed with a list of strings.
Argument of long options should be followed ^ by an equal sign (‘=’).
getopt( ) method returns value consisting of two elements.
Each of these values are stored separately in two different list (arrays) opts and orgs.
Eg:
opts, args = getopt.getopt (argv,”i:”, [‘ifile=’]) Where
opts – [(‘-i’, ‘c:\\pyprg\\p4’)
‘c:\\pyprg\\p4’ – Value, absolute path.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 33.
Write a Python program to execute the following C++ coding.
Answer:
#include <iostream>
using namespace std;
int main( )
{
cout<<“WELCOME”;
return(0);
}
The above C++ program is saved in a file welcome.cpp
import sys, Os, get opt
def main (argv)
cpp_file = 11
exe_file =11
opts, args = etopt.getopt(argv, “i:”, [‘i file=’] for 0, a in (“-1”, “ i file”):
if 0, in opts:
cpp_file = a + ‘.cpp’
exe_file = a + ‘.exe’
run(cpp_file, exe_file)
def run (cpp file, exe file):
print(“compiling”+cpp_file)
Os.system (‘g++’ +cpp file + ‘ – 0’ + exe_file)
print (“Running” + exefile)
print
Os.system (exe file)
print
if_name_== ‘_main_’: main (sys.argv[l:])

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 34.
Write a C++ program to create a class called Student with the following details.
Answer:
Protected member
Rno integer
Public members
void Readno(int); to accept roll number and assign to Rno
void Writeno( ); To display Rno.
The class Test is derived Publically from the Student class contains the following details.

Protected member
Mark1 float
Mark2 float
Public members
void Readmark(float, float); To accept mark1 and mark2
void Writemark( ); To display the marks
Create a class called Sports with the following detail

Protected members
score integer
Public members
void Readscore(int); To accept the score
void Writescore( ); To display the score
The class Result is derived Publically from Test and Sports class contains the following details

Private member
Total float
Public member
void display( ) assign the sum of mark1, mark2, score in total.
invokeWriteno( ), Writemark( ) and
Writescore( ). Display the total also.
Save the C++ program in a file called hybrid.
Write a python program to execute the hybrid.cpp
# include <io stream.h>
# include <conil.h>
class student
{
private:
char name [30];
int Rno;
Float mark1, mark2, Total_marks;
protected;
void Readmark ( )
{
cout <<“\n Type name, Roll no, markl, mark2”;
cin>>Rno>>Name>>mark1>>mark2;
}
void writescore ( )
{
Total marks = mark1 + mark2;
}
void writemark ( )
{ .
cout <<“\n Name” <<name;
cout <<“\n Roll No” <<Rno;
cout <<“\n Mark 1” <<mark1;
cout <<“\n Mark 2” <<mark2;
cout <<“\n Total_marks” <<Total_marks;
}
public:
student ( )
{
name [0] = ‘\o’;
Rno = mark1 = mark2 = totalmarks 0;
}
void execute ( );
{
Read mark ( );
Write score ( );
Write mark ( );
}
};
void main ( )
{
clrscr ();
student stud;
stud.execute ();
}
// save This file as hyprid.cpp
// Write python program to execute hyprid.Answer:
cpp in python
import sys, os, getopt
def main (argv):
cpp_file = “
exe_file = ”
opts, args = getopt.getopt(argv, “i:”,[ifile =])
for o, hyprid in opts:
if o in (“-i”, “–file”):
cpp_file = hyprid + ‘.cpp’
exe_file = hyprid + ‘.exe’
run (cpp_file, exe_file)
def run (cpp_file, exe_file):
os.system(‘g++’ + cpp_file + ‘-o’ + exe_file)
os.system (exe_file)
print
if name = ‘_main_’:
main (sys.argv [1:])

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 35.
Write a C++ program to print boundary elements of a matrix and name the file as Border.cpp
Answer:
// C++ program to print boundary element
// ot.matrix
# include <bits/studc++.h>
Using namespace std;
Const int MAX = 100;
void print Boundary (int a [ ][MAX],
int m, int n
{
for (int i = 0; i < m; i++)
{
for (int j = 0; j<n; j++)
{
if (i ==0 || j == 0|| i == n – 1 || j == n – 1)
cout <<a[i] [j] << “ ”;
else
cout<<“ ”
<<“ ”;
}
cout <<“\n”;
}
}
int main ( )
{
int a [4] [MAX] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {1,2, 3, 4}, {5,6, 7, 8}};
return 0; }
// To save this C++ program as Border.cpp

Write a python program to Border.cpp
import sys, os, getopt
def main (argv):
cPP_file=“
exe_file =”
opts, args = getopt.getopt (argv, for O, Border in opts:
if 0 in (‘-1”, “- -file”):
cpp-file = Border + ‘.cpp’
exe-file = Border + ‘.exe’
run cpp_file, exe_file)
def run (cpp_file, exe_file):
os.system (“g++” + cpp_file + ‘-0’ + exe_file)
os.system (exe_file)
if_name_ == ‘_main_’:
main (sys.argv [1:])

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Choose the best answer:

Question 1.
Python is mostly used as a …………… language.
(a) High level
(b) Scripting
(c) glue
(d) B or C
Answer:
(d) B or C

Question 2.
What is the name called, python deletes unwanted objects automatically to free the memory space?
(a) Recycle
(b) Garbage collection
(c) Interface
(d) Wrapping
Answer:
(b) Garbage collection

Question 3.
Which mode is specify to input or output in python?
(a) ‘-o’
(b) ‘-i’
(c) ‘-a’
(d) ‘-s’
Answer:
(a) ‘-o

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 4.
Which method is used to returns values ‘ consisting of two values?
(a) append ( )
(b) extend ( )
(c) getopt ( )
(d) insert ( )
Answer:
(c) getopt ( )

Question 5.
Which interface is used for python-like language for writing c-extensions?
(a) Cython
(b) Boost
(c) SWIG
(d) MinGW
Answer:
(a) Cython

Question 6.
Match the following:

(i) Python A. for windows
(ii) C++ B. wrapper interface
(iii) SWIG C. dynamic language
(iv) MinGW D. Statical language

(a) (i) – C, (ii) – D, (iii) – B, (iv) – A
(b) (i) – C, (ii) – B, (iii) – A, (iv) – D
(c) (i) – B, (ii) – A, (iii) – D, (iv) – C
(d) (i) – D, (ii) – A, (iii) – C, (iv) – B
Answer:
(a) (i) – C, (ii) – D, (iii) – B, (iv) – A

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 7.
Choose the incorrect pair:

Column – I Column – II
(a) Python interpreted
(b) C++ Compiled
(c) TCI High level language
(d) ASP Script language

Answer:
(c)

Question 8.
Choose the correct pair:

Column – I Column – II
(a) stud.py module
(b) sys.argv getopt module
(c) os.system sys module
(d) getopt A variable

Answer:
(a)

Question 9.
Choose the incorrect statement.
(a) Python is typically a compiled language.
(b) Python is a dynamic typed language.
(c) In python, Data type is not required while declaring variable.
(d) Python is a script and general purpose language.
Answer:
(a) Python is typically a compiled language.

Question 10.
Choose the correct statement.
(a) Sys module provides access to variable used by the compiler.
(b) sys.argv is the list of command-line arguments passed to the python program,
(c) Python has no standard (Built in) modules.
(d) Module does not provide reusability of code.
Answer:
(b) sys.argv is the list of command-line arguments passed to the python program

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 11.
Assertion (A):
Python is actually an interpreter, high level, general-purpose programming language.
Reason (R):
It can be used for processing text, numbers, images, scientific data and just about anything else you might save on a i computer.
(a) Both A and R are True, And R is the correct explanation for A.
(b) Both A and R are True, But R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(a) Both A and R are True, And R is the correct explanation for A.

Question 12.
Assertion (A):
Modular programming is a software design technique to split your code into separate parts.
Reason (R):
Python has number of standard (Build-in) modules.
(a) Both A and R are True, And R is the correct explanation for A.
(b) Both A and R are True, But R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(b) Both A and R are True, But R is not the correct explanation for A.

Question 13.
Pick the odd one out.
(a) TCI
(b) ASP
(c) Ruby
(d) Java
Answer:
(d) Java

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 14.
Which language is used both as scripting and general purpose language?
(a) C
(b) C++
(c) Python
(d) HTML
Answer:
(c) Python

Question 15.
Which programming language is designed for integrating and communicating with other programming language?
(a) Modular language
(b) Procedural language
(c) Scripting language
(d) High level language
Answer:
(a) Modular language

Question 16.
Which of the following is not a scripting language?
(a) Ruby
(b) TCI
(c) ASP
(d) COBOL
Answer:
(d) COBOL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 17.
Which requires a programming language?
(a) Compiler
(b) Interpreter
(c) Editor
(d) Exefile
Answer:
(a) Compiler

Question 18.
Which is requires a scripting language?
(a) Compiler
(b) Interpreter
(c) Editor
(d) Exefile
Answer:
(b) Interpreter

Question 19.
Which of the following interface used for interfacing with C programs?
(a) Cython
(b) Ctypes
(c) MinGw
(d) SWIG
Answer:
(b) Ctypes

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 20.
Which of the following python interface used for both C and C++?
(a) Cython
(b) Ctypes
(c) MinGw
(d) SWIG
Answer:
(d) SWIG

Question 21.
Which is needed to run a C++ program on windows?
(a) m++
(b) g++
(c) e++
(d) f++
Answer:
(b) g++

Question 22.
Which of the following is not a python module?
(a) sys
(b) g++
(c) os
(d) Getopt
Answer:
(b) g++

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 23.
Which version of MinGw is the best compilerfor C++ on windows?
(a) W32
(b) W64
(c) W128
(d) W256
Answer:
(a) W32

Question 24.
Which interface to a set of runtime headerfiles, used compiling and linking the code of C, C++?
(a) SWIG
(b) MinGw
(c) Cython
(d) Ctypes
Answer:
(b) MinGw

Question 25.
g++ is a
(a) module
(b) program
(c) scope
(d) identifier
Answer:
(b) program

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 26.
Which command is used to clear the screen in window?
(a) els
(b) clear
(c) cs
(d) cl
Answer:
(a) els

Question 27.
Which operator is used to access the function?
(a) (.) dot
(b) (:) colon
(c) (,) comma
(d) (;) semi colon
Answer:
(a) (.) dot

Question 28.
Which is mostly used as a ‘glue’ language?
(a) C
(b) C++
(c) Java
(d) Python
Answer:
(d) Python

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 29.
Which of the following is not a scripting language?
(a) JavaScript
(b) PHP
(c) Perl
(d) HTML
Answer:
(d) HTML

Question 30.
Importing C++ program in a Python program is called:
(a) wrapping
(b) Downloading
(c) Interconnecting
(d) Parsing
Answer:
(a) wrapping

Question 31.
The expansion of API is:
(a) Application Programming Interpreter
(b) Application Programming Interface
(c) Application Performing Interface
(d) Application Programming Interlink
Answer:
(b) Application Programming Interface

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 32.
A framework for interfacing Python and C++ is:
(a) Ctypes
(b) SWIG
(c) Cython
(d) Boost
Answer:
(d) Boost

Question 33.
Which of the following is a software design technique to split your code into separate parts?
(a) Object oriented Programming
(b) Modular programming
(c) Low Level Programming
(d) Procedure oriented Programming
Answer:
(b) Modular programming

Question 34.
The module which allows you to interface with the Windows operating system is:
(a) OS module
(b) sys module
(c) csv module
(d) getopt module
Answer:
(a) OS module

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 35.
getopt( ) will return an empty array if there is no error in splitting strings to:
(a) argv variable
(b) opt variable
(c) args variable
(d) ifile variable
Answer:
(c) args variable

Question 36.
Identify the function call statement in the following snippet.
if _name _ ==‘_main_
main(sys.argv[l:])
(a) main(sys.argv[l:])
(b) _name_
(c) _main_
(d) argv
Answer:
(c) main

Question 37.
Which of the following can be used for processing text, numbers, images, and scientific data?
(a) HTML
(b) C
(c) C++
(d) PYTHON
Answer:
(d) PYTHON

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 14 Importing C++ Programs in Python

Question 38.
What does name contains ?
(a) C++ filename
(b) main( ) name
(c) python filename
(d) os module name
Answer:
(d) os module name

TN Board 12th Computer Science Important Questions

TN Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files

TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files

Question 1.
What is purpose of CSV file?
Answer:

  1. CSV is a simple file format used to store data, such as spreadsheet or database.
  2. They are plain text and easier to import into a spreadsheet or another storage database, regardless of the specify software you are using.

Question 2.
What do you know about a CSV file?
Answer:
A CSV file is also known as a flat File. File in the CSV format can be imported to and exported from programs that store data in tables, such as Microsoft Excel or open office calc.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 3.
How will you create new a CSV file?
Answer:

  1. To create a CSV file in Notepad, First open a new file using
    File → New or ctrl + N
  2. Then enter the data you want the file to contain, separating each value with a comma and each row with a new line.

Question 4.
What ¡s a dialect?
Answer:

  1. A dialect describes the format of the CSV file that is to be read.
  2. In dialect the parameter “Skip initial space” is used for removing whitespaces after the delimiter.

Question 5.
What is difference CSV.writer ( ) and writerow ( ) methods?
Answer:

CSV writerow ( ) writerow ( )
The CSV.writerow ( ) method returns a wirter object which converts the user’s data into delimited string on the given file like object. The writerow ( ) method writes a row of data into the specified file.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 6.
What is the use of Line Terminator in CSV file?
Answer:

  1. A Line Terminator is a string used to terminate lines produced by writer. The default value is \r or \n,
  2. We can write CSV file with a line terminator in python by registering new dialects using csv.register dialect ( ) class of csv module.

Question 7.
What is CSV module?
Answer:

  1. The CSV module will be able to read and write the vast majority of CSV files.
  2. CSV module which gives the python programmer the ability to parse.

Question 8.
How can you open a CSV files?
Answer:
We can open CSV files in a spread sheet program like Microsoft Excel or in a Text editor or through a data base which make them easier to read.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 9.
What is use of Skipinitial space?
Answer:
In dialects the parameter “Skipinitial Space” is used for removing whitespaces after the delimiter.

Question 10.
What is a list?
Answer:

  1. A list is a data structure in python that is a module, or changeable, ordered sequence of elements.
  2. List literals are written square brackets [ ]. List work similarly to strings.

Question 11.
What is difference between sorted ( ) and sort ( ) method?
Answer:

  1. The sorted ( ) method sorts the elements of a given item in a specific order Ascending or Descending.
  2. Sort ( ) method which performs the same way as sorted ( ). Only difference, sort () method does not return any value and changes the original list itself.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 12.
What is an ordered Diet?
Answer:

  1. An ordered Diet is a dictionary subclass which saves the order in which its contents are added.
  2. To remove the ordered Diet use diet ( ).

Question 13.
Explain the CSV module’s Reader Function.
Answer:
(i) csv.reader ( ) function is designed to take each line of the file and make a list of all columns.
(ii) Using this function one can read data from csv files of different formats like quotes (“ ”), pipe (|) and comma (,).
(iii) The syntax for csv.reader is csv.reader (fileobject, delimiter, fmtparams)
Where
File object – Passes the path and mode .
delimiter – an optional parameter containing the standard dialects.
fmtparams – optional parameter with default values of the dialects.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 14.
What are different types in CSV files while writing Data?
Answer:

  1. Creating a new normal CSV file.
  2. Modifying an Existing file.
  3. Writing on a CSV file with Quotes.
  4. Writing on a CSV file with Custom Delimiters.
  5. Writing on a C S V file with Lineterminator.
  6. Writing on a CSV file with Quotechars.
  7. Writing CSV file into a Dictionary.
  8. Getting Data at Runtime and Writing in a file.

Question 15.
Write a program to sort a list using next( ) method.
Answer:
# sort a selected column given by user leaving the header column
import csv
inLile= ‘c:\\pyprg\\sample6.csv’
python file
F=open(inFile,‘r’)
reader = csv.reader(F)
next(reader)
arrayValue = [ ]
a = int(input (“Enter the column number 1 to 3:-”))
for row in reader:
arrayValue.append(row[a])
array Value. sort( )
for row in array Value:
print (row)
F.elose( )

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 16.
Write the different types writing Data into in csv files.
Answer:
(i) Creating A New Normal CSV File:
This method, we can create a normal csv file using writer ( ) method of csv module having default delimiter comma (,).

(ii) Modifying An existing file:
Making some changes in the data of existing file or adding more data is called modification.

(iii) Writing on A CSV file with Quotes:
We can write the CSV file with quotes, by registering new dialects using csv. register_dialect ( ) class of CSV module.

(iv) Writing on A CSV File with custom Delimiters:
A diameter is a string used to separate fields. The default value is comma (,).

(v) CSV File with A Line Terminator:
A Line Terminator is a string used to terminate lines product by writer. The default values is \r or \n.

(vi) CSV File with quotes character:
The csv file with custom quote characters, by registering new dialects using csv. refister dialect ( ) class of csv module.

(vii) Writing CSV File into A Dictionary:
Using Dictwriter ( ) Class of csv module, we can write a csv file into a dictionary. It creates an object which maps data into a dictionary. The keys are given by the fieldnames parameter.

(viii) Getting Data At Runtime and Writing it in a CSV file:
We can accept data thought key board and write in to a csv file.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 17.
What is CSV File?
Answer:

  1. CSV – Comma Separated Values.
  2. CSV module which gives the python programmer the ability to parse CSV files.
  3. A CSV file is a human readable text file where each line has a number of fields, separated by commas or some other delimiter.

Question 18.
Mention the two ways to read a CSV file using Python.
Answer:
There are two ways to read a CSV file.

  • Use the CSV module’s reader function.
  • Use the DictReader class.

Question 19.
Mention the default modes of the File.
Answer:

  1. ‘t’ – open the text mode in default.
  2. The default is reading in text mode, while reading from the file the data would be in the format of strings.
  3. ‘r’- Open the file for reading in default.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 20.
What is use of nextQ function?
Answer:

  1. CSV file data for a selected column for sorting, the row heading is also get sorted, to avoid that the first row should be skipped.
  2. This can be done by using the command next ( ) function.

Question 21.
How will you sort more than one column from a csv file?Give an example statement.
Answer:
To sort by more than one column we can use itemgetter with multiple indices.
Eg:
Operator. itemgetter( 1,2)
The first and second rows are sorted from CSV file and displayed in ascending order.

Question 22.
Write a note on open( ) function of python. What is the difference between the two methods?
Answer:
Python has a built – in function open ( ) to open a file. This function returns a file object, also called a handle, as it is used to read or modify the file accordingly.
Eg:
>>> c = open (“stud.txt”)
# open file in current directory
>>> c = open (‘D:\\prg\\Temp\\stud.csv’’) Specifing full path
Whether you want to read ‘r’, write ‘w’ or append ‘a’ to the file, also specify the opening file.
Python has two methods
(i) readable () – Returns True if the stream can be read from.
(ii) readline (n = -1) – Read and return a list of lines from the file.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 23.
Write a Python program to modify an existing file.
Answer:
The following program modify the “student, csv” file by modifying the value of an existing row in student.csv
import csv
row = [‘3’, ‘Meena’,’Bangalore’]
with open(‘student.csv’, ‘r’) as readFile:
reader = csv.reader(readFile)
lines = list(reader)
# list()- to store each row of data as a list
lines[3] = row
with open(‘student.csv’, ‘w’) as writeFile:
# returns the writer object which converts the user data with delimiter
writer = csv.writerfwriteFile)
#writerows( )method writes tnultiple rows to a csv file
writer . writerows(lines)
readFile.close( )
writeFile.close( )

Question 24.
Write a Python program to read a CSV file with default delimiter comma (,).
Answer:
The following program read a file called “sample 1 .csv” with default delimiter comma (,) and print row by row.
importing csv
import csv
#opening the csv file which is in different location with read mode
with open(‘c:\\pyprg\\samplel.csv’, ‘r’) as
F:
#other way to open the file is f= (‘c:\\pyprg\\ samplel.csv’, ‘r’)
reader = csv.reader(F)
# printing each line of the Data row by row print(row)
F.close( )

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 25.
What is the difference between the write mode and append mode.
Answer:

  1. Write (w) and Append (a) mode, while opening a file are almost the same.
  2. Append mode is used to append or add data to the existing data of file, if any.
  3. Hence, when you open a file in Append (a) mode, the cursor is positioned at the end of the present data in the file.

Question 26.
What is the difference between reader( ) and DictReader( ) function?
Answer:

  1. The main difference between the csv.reader( ) and DictReader( ) is in simple terms csv.reader and csv.writer work with list/tuple.
  2. While csv.DictReader and csv.Dictwriter work with dictionary.
  3. csv.DictReader and csv.dietwriter take additional argument fieldnames that are used as dictionary keys.
  4. To read a csv file into a dictionary can be done by using DictReader class of csv module which works similar to the reader( ) class but creates an object which maps data to a dictionary.

Question 27.
Differentiate Excel file and CSV file.
Answer:

Excel CSV file
Excel is a binary file that holds information about all the worksheets in a file, including both content and formatting. CSV format is a plain text format with a series of values separated by commas.
XLS files can only be read by applications that have been especially written to read their format, and can only be written in the same way. CSV can be opened with any text editor in Windows like notepad, MS Excel, OpenOffice, etc.
Excel is a spreadsheet that saves files into its own proprietary format viz. xls or xlsx. CSV is a format for saving tabular information into a delimited text file with extension .csv
Excel consumes more memory while importing data. Importing CSV files can be much faster, and it also consumes less memory.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 28.
Tabulate the different mode with its meaning.
Answer:
r – Open file for reading
w – Open file for writing
x – Open file for exclusive creation
a – Open for appending
t – Open in text mode
b – Open in binary mode
t – Open a file for updating.

Question 29.
Write the different methods to read a File in Python.
Answer:
(i) CSV module’s Reader function:
The reader function is designed to take each line of the file and make a list of all columns.
Using this method one can read data from csv files of different formats like quotes (“ ”), pipe (|) and column (,).
The syntax is csv.reader (file object, delimiter, fmt params)

(ii) Read a specific column in a file:
To get the specific columns like only item.
Eg:
readfile = csv.reader (f)
for col in readfile:
print col[0], col[3] f.close ()
(iii) Read a csv file and store It In A list:
are going to read a csv file and the contents of the file will be stored as a list.
The syntax for storing in the List is
list = [ ]
list.append (element)

(iv) Reading csv file Into a Dictionary:
To read a csv file into a dictionary can be done by using DictReader class of csv module which works similar to the reader ( ) class but creates an object which maps data to a dictionary. The main difference is in simple terms csv.reader () and DictReader( )is in simple terms csv.reader and csv.writer work with list/tuple, while csv.DictReader and csv.Dictwriter work with dictionary.

(v) Reading csv file with user Defined Delimiter into a dictionary:
We can register new dialects and use it in the DictReader( ) methods.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 30.
Write a Python program to write a CSV File with custom quotes.
Answer:
import csv
info = [[‘SNO\ ‘Person’, ‘DOB’],
[‘1’, ‘Madhu’, ‘18/12/2001’],
[‘2’, ‘Sowmiya’,’ 19/2/1998’],
[‘3’, ‘Sangeetha’,’20/3/1999’],
[‘4’, ‘Eshwar’, ‘21/4/2000’],
[‘5’, ‘Anand’, ‘22/5/2001’]]
csv.register_dialect(‘myDialect’, quoting = csv.QUOTEALL)
with open(‘c:\\pyprg\\chl3\\person.csv’,‘w’) asf:
writer = csv.writer(f, dialect=‘myDialect’) for row in info: writer, writero w(row)
. f.close( )

Question 31.
Write the rules to be followed to format the data in a CSV file.
Answer:
Rules to be followed to format data in a CSV . file:
(i) Each record (row of data) is to be located on a separate line, delimited by a line break by pressing enter key.
Eg:
xxx,yyy TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 1
TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 1 denotes enter Key to be pressed

(ii) The last record in the file may or may not have an ending line break.
Eg:
PPP, qqq TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 1
yyy, xxx

(iii) The header will contain names corresponding to the fields in the file and should contain the same number of fields as the records in the rest of the file.
Eg:
fieldnamel ,field_name2, field_name3 TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 1
aaa,bbb,ccc TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 1
zzz,yyy,xxx CRLF( Carriage Return and Line Feed)

(iv) Within the header and eafeh record, there may be one or more fields, separated by commas. Spaces are considered part of a field and should not be ignored. The last field in the record must not be followed by a comma.
For example: Red , Blue

(v) Each field may or may not be enclosed in double quotes. If fields are not enclosed with double quotes, then double quotes may not appear inside the fields.
Eg:
“Red”,’’Blue”,”Green” TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 1
Black,White,Yellow

(vi) Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes.
Eg:
Red, ” , “Blue CRLF
Red, Blue , Green

(vii) If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be preceded with another double quote.
Eg:
“Red, ” “Blue”, “Green”,
, , White

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 32.
Write a Python program to read the following Namelist.
Answer:

TN State Board 12th Computer Science Important Questions Chapter 13 Python and CSV Files 2

# program Namelist.csv file alphabetical order.
import.csv
infile = ‘c:\\pyprg\\Namelist.csv’

Python file
F = open (in file,’r’)
reader = csv.reader (F)
next (reader)
array value = [ ]
for row in reader:
array value.append (row)
array value.sort ()
for row in array value:
print (row)
F. close ( )

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 33.
Write a Python program to accept the name and five subjects mark of 5 students. Find the total and store all the details of the students in a CSV file.
Answer:
import csv
with open (‘c:\\pyprg\\school\\student. csv’,w) as f:
w – csv.writer (f) ans = ‘y’
while (ans =r-=‘y’): name = input (“Name”) subl = input (“subject 1 mark”) sub2 = input (“subject 2 mark”) sub3 = input (“subject 3 mark”) sub4 = input (“subject 4 mark”) sub5 = input (“subject 5 mark”)
Total = 0
Total = subl+sub2+sub3+sub4+sub5
w.writerow ([name, subl, sub2, sub3, sub4, sub5,Total])
ans = input (“Do you want more y/n”)
F = open (‘c:\\pyprg\\school\\stuent.csvYr’) reader = csv.reader (F) for row in reader:
Print (row)
F.close ( )

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Choose the best answer:

Question 1.
What is extension filename of CSV?
(a) .txt
(b) .xls
(c) .csv
(d) .py
Answer:
(c) .csv

Question 2.
What is the shortcut key used to open a new CSV file in notepad?
(a) Ctrl + O
(b) Ctrl + N
(c) Ctrl + N
(d) Alt + O
Answer:
(b) Ctrl + N

Question 3.
Each record is to be located on a separate line, delimited by a line break by pressing:
(a) Enter key
(b) Ctrl key
(c) Alt key
(d) Esc key
Answer:
(a) Enter key

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 4.
Which CSV file will be opened default?
(a) Open office calc
(b) MS Excel
(c) Star office calc
(d) Launch Excel
Answer:
(b) MS Excel

Question 5.
Which of the following is open the text mode?
(a) ‘r’
(b) ‘x’
(c) ‘a’
(d) ‘t’
Answer:
(d) ‘t’

Question 6.
Which is default file mode to open a file for reading?
(a) ‘r’
(b) ‘x’
(c) ‘a’
(d) ‘t’
Answer:
(a) ‘r’

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 7.
Which statement is best way to do ensures that the file is closed?
(a) With
(b) Exit
(c) Stop
(d) Close
Answer:
(a) With

Question 8.
A dialect is a:
(a) Class
(b) Object
(c) Method
(d) Function
Answer:
(a) Class

Question 9.
Which delimiter is considered as column separator?
(a) = (equal)
(b) , (comma)
(c) | (pipe)
(d) & (amphersand)
Answer:
(c) | (pipe)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 10.
Which operator is used to set more than one column in csv file?
(a) Sort record
(b) item getter
(c) data getter
(d) column getter
Answer:
(b) item getter

Question 11.
Which class can be done to read csv file into a dictionary?
(a) dict( )
(b) Read
(c) DictReader
(d) Reader
Answer:
(c) DictReader

Question 12.
Which method is used to writes all the data in to the new csv file?
(a) write rows ( )
(b) write row ( )
(c) store rows ( )
(d) store row ( )
Answer:
(a) write rows ( )

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 13.
What is called to add more data in the existing csv file?
(a) Append
(b) Adding
(c) Modification
(d) Writing
Answer:
(c) Modification

Question 14.
Which of the following known as default line terminator to write csv file?
(a) ‘/r’
(b) ‘\n’
(c) ‘\w’
(d) Both (a) and (b)
Answer:
(d) Both (a) and (b)

Question 15.
Which function is used to print the data in dictionary format without order?
(a) DictReader ( )
(b) diet ( )
(c) function diet ( )
(d) Dictwriter ( )
Answer:
(b) diet ( )

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 16.
Which is the default mode of csv file in reading and writing?
(a) text mode
(b) binary mode
(c) formated mode
(d) pdf mode
Answer:
(a) text mode

Question 17.
Python has a garbage collector to clean up unreferenced:
(a) variables
(b) objects
(c) method
(d) function
Answer:
(b) objects

Question 18.
Which is used for removing white spaces after the delimiter in csv file?
(a) “Skip initial space”
(b) “Skip”
(c) “space”
(d) “initial space”
Answer:
(a) “Skip initial space”

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 19.
csv.reader and csv.writer work with:
(a) list
(b) tuple
(c) a or b
(d) None
Answer:
(c) a or b

Question 20.
Adding a new row at the end of file is called:
(a) Adding a row
(b) Appending a row
(c) Inserting a row
(d) Modifying a row
Answer:
(b) Appending a row

Question 21.
Match the following:

(i) ‘r’ A. updating mode
(ii) ‘w’ B. appending mode
(iii) ‘a’ C.  writing mode
(iv) ‘t’ D. reading mode

(a) (i) – D, (ii) – C , (iii) – B, (iv) – A
(b) (i) – D, (ii) – B, (iii) – A, (iv) – C
(c) (i) – B, (ii) – A , (iii) – C, (iv) – D
(d) (i) – B, (ii) – C, (iii) – D, (iv) – A
Answer:
(a) (i) – D, (ii) – C , (iii) – B, (iv) – A

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 22.
Match the following:

(i) ‘w’ A. add data end of file
(ii) ‘a’ B. write a new file
(iii) write row ( ) C. write all rows
(iv) write rows ( ) D. write one row

(a) (i) – B, (ii) – A, (iii) – D, (iv) – C
(b) (i) – B, (ii) – D, (iii) – C, (iv) – A
(c) (i) – D, (ii) – C, (iii) – A, (iv) – B
(d) (i) – D, (ii) – A, (iii) – B, (iv) – C
Answer:
(a) (i) – B, (ii) – A, (iii) – D, (iv) – C

Question 23.
Match the following:

(i) close ( ) A. Convert delimited strings
(ii) DictReader  ( ) B. print the data
(iii) Function diet ( ) C. tied with the file
(iv) csv. writer ( ) D. creates an object

(a) (i) – C, (ii) – B , (iii) – A, (iv) – D
(b) (i) – C, (ii) – D, (iii) – B, (iv) – A
(c) (i) – B, (ii) – A, (iii) – D, (iv) – C
(d) (i) – B, (ii) – D, (iii) – C, (iv) – A
Answer:
(b) (i) – C, (ii) – D, (iii) – B, (iv) – A

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 24.
Choose the incorrect pair:
(a) CSV – comma separated value
(b) XLS – excel sheets
(c) CRLF – control Return and Line Feed
(d) PY – Python
Answer:
(c) CRLF – control Return and Line Feed

Question 25.
Choose the correct pair:
(a) ‘x’ – open binary mode
(b) ‘b’ – open for writing
(c) ‘t’ – open for updating
(d) ‘t’ – open for reading
Answer:
(c) ‘t’ – open for updating

Question 26.
Choose the incorrect statement:
(a) Excel is binary file in python.
(b) csv format is a plain text.
(c) Import csv files can be much slower.
(d) CSV is a format for saving tabular information.
Answer:
(c) Import csv files can be much slower.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 27.
Choose the incorrect statement:
(a) Files saved in excel cannot be opend or edited by text editors.
(b) CSV file can be store charts and graphs.
(c) A CSV file is also known as a flat file.
(d) A CSV file is a text file.
Answer:
(b) CSV file can be store charts and graphs.

Question 28.
Choose the correct statement:
(a) The last record in the CSV file may or may not have an ending line break.
(b) In CSV file, each field must be enclosed in single quotes.
(c) In CSV file, double-quotes should not be used to enclosed fields.
(d) In CSV file, each record is to be located on a single line.
Answer:
(a) The last record in the CSV file may or may not have an ending line break.

Question 29.
Pick the odd one out.
(a) MS Excel
(b) Open office calc
(c) Python
(d) Star office calc
Answer:
(c) Python

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 30.
Pick the odd one out
(a) (“ ”) quotes
(b) (|) pipe
(c) (,) comma
(d) (;) semicolon
Answer:
(d) (;) semicolon

Question 31.
Assertion (A):
The commas that are part of your data will then be kept separate from the commas which delimit the fields themselves.
Reason (R):
If the fields of data in your CSV file contain commas, you can protect them by enclosing those data fields in double-quotes (“ ”)
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True but R is not the correct explanation for A.
(c) A is true But R is False.
(d) A is False But R is True.
Answer:
(a) Both A and R are True and R is the correct explanation for A.

Question 32.
Assertion (A):
In CSV files, a delimiter is a string used to separate fields.
Reason (R):
The default value is (;) semicolon.
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True but R is not the correct explanation for A.
(c) A is true But R is False.
(d) A is False But R is True.
Answer:
(c) A is true But R is False.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 33.
Which spreadsheet, by default the CSU file will be opened?
(a) Open office calc
(b) Star calc
(c) MS Excel
(d) All of these
Answer:
(c) MS Excel

Question 34.
Which of the mode for open a file for writing?
(a) ‘r’
(b) ‘w’
(c) ‘x’
(d) ‘o’
Answer:
(b) ‘w’

Question 35.
Which of the mode for open a file for exclusive creation?
(a) ‘r’
(b) ‘w’
(c) ‘x’
(d) ‘o’
Answer:
(c) ‘x’

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 36.
Which of the mode to open for appending at the end of the file without truncating it?
(a) ‘a’
(b) ‘t’
(c) ‘b’
(d) ‘+’
Answer:
(a) ‘a’

Question 37.
Which of the mode to open in binary mode?
(a) ‘a’
(b) ‘f
(c) ‘b’
(d) ‘+’
Answer:
(c) ‘b’

Question 38.
Which of the mode to open a file for updating?
(a) ‘a’
(b) ‘t’
(c) ‘b’
(d) ‘+’
Answer:
(d) ‘+’

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 39.
How many ways to read a CSV file?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(a) 2

Question 40.
How many types of modes can be used while opening a CSV file?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(b) 3

Question 41.
Which of the following is not type of mode while opening a CSV file?
(a) w
(b) r
(c) a
(d) m
Answer:
(d) m

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 42.
When reading CSV file in text mode, the format of data should be:
(a) string
(b) integer
(c) character
(d) float
Answer:
(a) string

Question 43.
How many ways are available to write or ‘ modify the existing CSV file?
(a) 2
(b) 4
(c) 6
(d) 8
Answer:
(d) 8

Question 44.
What is extension of CSV file?
(a) .cs
(b) .cv
(c) .csv
(d) .c
Answer:
(c) .csv

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 45.
A CSV file is also known as a:
(a) Flat File
(b) 3D File
(c) String File
(d) Random File
Answer:
(a) Flat File

Question 46.
The expansion of CRLF is:
(a) Control Return and Line Feed
(b) Carriage Return and Form Feed
(c) Control Router and Line Feed
(d) Carriage Return and Line Feed
Answer:
(d) Carriage Return and Line Feed

Question 47.
Which of the following module is provided by Python to do several operations on the CSV files?
(a) py
(b) xls
(c) csv
(d) os
Answer:
(c) csv

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 48.
Which of the following mode is used when dealing with non-text files like image or exe files?
(a) Text mode
(b) Binary mode
(c) xls mode
(d) csv mode
Answer:
(b) Binary mode

Question 49.
The command used to skip a row in a CSV file is:
(a) next( )
(b) skip( )
(c) omit( )
(d) bounce( )
Answer:
(a) next( )

Question 50.
Which of the following is a string used to terminate lines produced by writer( )method of csv module? .
(a) Line Terminator
(b) Enter key
(c) Form feed
(d) Data Terminator
Answer:
(a) Line Terminator

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 51.
What is the output of the following program? import csv
d=csv.reader(open(‘c:\PYPRG\ch 13\city. csv’))
next(d)
for row in d:
print(row)
if the file called “city.csv” contain the following details
chennai, mylapore mumbai, andheri
(a) chennai,mylapore
(b) mumbai,andheri
(c) chennai-mumbai
(d) chennai,mylapore-mumbai,andheri
Answer:
(b) mumbai,andheri

Question 52.
Which of the following creates an object which maps data to a dictionary?
(a) listreader( )
(b) reader( )
(c) tuplereader( )
(d) DictReader ( )
Answer:
(d) DictReader ( )

Question 53.
Making some changes in the data of the existing file or adding more data is called:
(a) Editing
(b) Appending
(c) Modification
(d) Alteration
Answer:
(c) Modification

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 13 Python and CSV Files

Question 54.
What will be written inside the file test.csv using the following program?
import csv
D = [[‘Exam’],[‘Quarterly’],[‘Halfyearly’]]
csv.register_dialect( ‘ M ’ ,lineterminator= V)
with open(‘c:\pyprg\chl3\line2.csv’,‘w’)asf:
wr = csv.writer(f,dialect=‘M’)
wr.writerows(D)
f.close( )
(a) Exam Quarterly Halfyearly
(b) Exam Quarterly Halfyearly
(c) E
Q
H
(d) Exam,
Quarterly,
Halfyearly
Answer:
(d) Exam,
Quarterly,
Halfyearly

TN Board 12th Computer Science Important Questions

TN Board 12th Computer Science Important Questions Chapter 12 Structured Query Language (SQL)

TN State Board 12th Computer Science Important Questions Chapter 12 Structured Query Language (SQL)

Question 1.
What is known as CRUD?
Answer:
RDBMS is a type of DBMS \yith a row based table structure that connects related data elements and includes functions related to create, Read, update and Delete operations, collectivity known as CRUD.

Question 2.
What is a Table?
Answer:

  1. A Table is a collection of related data entries and it consists of rows and columns.
  2.  The data in RDBMS is stored in database objects called tables.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 3.
What is a Record?
Answer:

  1. A Record is a row, which is a collection of related fields or columns that exist in Table.
  2. A record is a horizontal entity in a table which represents the details of a particular student in a student table.

Question 4.
What is data definition language?
Answer:

  1. The Data definition language (DDL) consists of SQL statements used to define the database structure or schema.
  2. The DDL provides a set of definitions to specify the storage structure and access method used by the database system.

Question 5.
What is Data Manipulation Language?
Answer:
A data manipulation language (DML) is a computer programming language used for adding, removing and modifying data in a database.

Question 6.
What are types of DML?
Answer:
The DML basically of two types

  • Procedural DML – Requires a user to specify what data is needed and how to get it.
  • Non – procedural DML – Requires a user to specify what data is needed without specifying how to get it.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 7.
What are SQL commands which comes under Data Definition Language?
Answer:

  1. Create
  2. Alter
  3. Drop
  4. Truncate

Question 8.
What are SQL commands which comes under Data Manipulation Language?
Answer:

  1. Insert
  2. Update
  3. Delete

Question 9.
What are the SQL commands which comes under Data Control Language?
Answer:

  • Grant – Grant permission to one or more users to perform specific tasks.
  • Revoke – Withdraws the access permission given by the GRANT statement.

Question 10.
What are SQL commands which comes under Control Language?
Answer:

  1. Commit
  2. Rollback
  3. Save point

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 11.
Write a update command, the age to 17 for those student whose place is MADURAI using SET keyword.
Answer:
UPDATE student SET Age = 17 WHERE Place = “MADURAI”;

Question 12.
What is difference between DROP and DELETE commands?
Answer:

  1. DROP command is to remove entire Table in a database. Once a table is dropped we cannot get it back.
  2. DELETE command deletes only the rows from the table based on the condition.

Question 13.
What is difference for DISTINCT and ALL keywords?
Answer:

  1. DISTINCT keyword to eliminate duplicate rows in the table. This helps to eliminate redundant data.
  2. ALL keyword retains duplicate rows.

Question 14.
Write syntax ORDER BY clause?
Answer:
SELECT <column Name> [, <column- Name>,…] FROM <table~name> ORDER BY <columnl>, <column2>,… ASC/DESC;
Eg: SELECT*FROM Student ORDER BY Name ASC:

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 15.
What is HAVING clause?
Answer:
The HAVING clause can be used along with GROUP BY clause in the SELECT Statement to place condition on groups and can include aggregate functions on them.

Question 16.
What is use of COMMIT command?
Answer:

  1. The COMMIT command is used to permanently save any transaction to the database.
  2. When any DML commands INSERT, UPDATE, DELETE commands are used, the changes made by using COMMIT command.

Question 17.
What is difference between DISTINCT keyword and ALL keyword?
Answer:

  1. The DISTINCT keyword is used along with the SELECT command to eliminate duplicate rows in the table.
  2. The All Keyword retains duplicate rows.
  3. It will display every row of the table without considering duplicate entries.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 18.
Write the difference between BETWEEN and NON-BETWEEN keywords.
Answer:

  1. The BETWEEN keyword defines a range the record must fall into to make the condition true.
  2. The NOT BETWEEN is reverse of the BETWEEN operator where the records not satisfying the condition are displayed.

Question 19.
Write the difference between In and NOT IN keyword.
Answer:

  1. The IN keyword is used to specify a list of values which must be matched with the record values. It is similar to OR condition.
  2. The NOT IN keyword displays only those records that do not match in the list.

Question 20.
What is the use of check constraint?
Answer:
The check constraint may use relational and logical operations for condition.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 21.
What is the use of ORDER BY clause?
Answer:
The ORDER BY clause in SQL is used to sort the data in either ascending or descending based on one or more columns.

Question 22.
What is the use of GROUP BY clause?
Answer:
The GROUP BY clause is used with the SELECT statement to group the students on rows or columns having identical values or divide the table in to groups.

Question 23.
What is the use of HAVING clause?
Answer:
The E1AVING clause can be used along with GROUP BY clause in the SELECT statement to place condition on groups and can include aggregate function on them.

Question 24.
What is the use of COMMIT command?
Answer:
The COMMIT command is used to permanently save any transaction to the database.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 25.
What is the use of ROLLBACK command?
Answer:
The ROLLBACK command is used to restores the database to the last committed state.

Question 26.
What is the use of SAVEPOINT command?
Answer:
The SAVEPOINT command is used to temporarily save a transaction.

Question 27.
How can you create a database?
Answer:
(i) To create a database
CREATE DATABASE database name;
Eg:
CREATE DATABASE student;

(ii) To work with the database
USE DATABASE;
Eg:
USE student;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 28.
What is WAMP?
Answer:
(i) WAMP stands for “windows, Apache, MySQL and PHP”.
(ii) WAMP is a variation of LAMP for windows system and is installed as a software bundle (Apache, MySQL and PHP).
(iii) It is often used for web development and internal testing, but may also be used to serve live websites.

Question 29.
Write the function of DDL commends.
Answer:
A DDL performs the following functions:

  1. It should identify the type of data division such as data item, segment, record and database file.
  2. It gives a unique name to each data item type, record type, file type and data base.
  3. It should specify the proper data type.
  4. It should define the size of the data item.
  5. It may define the range of values that a data item may use.
  6. It may specify privacy locks for preventing unauthorized data entry.

Question 30.
What is mean by Data Manipulation?
Answer:

  1. Insertion of new information into the database.
  2. Retrieval of information stored in a database.
  3. Deletion of infonnation from the database.
  4. Modification of data stored in the database.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 31.
Write the SQL commands and their functions.
Answer:
Tables are the only way to store data, therefore all the information has to be arranged in the form of tables. The SQL provides a predetermined set of commands to work on databases.

Keywords:
They have a special meaning in SQL. They are understood as instructions. Commands: They are instructions given by the user to the database also known as statements.

Clauses:
They begin with a keyword and consist of keyword and argument.

Question 32.
Explain DELETE, TRUNCATE and DROP statement.
Answer:
(i) DELETE:
The DELETE command deletes only the rows from the table based on the condition given in the where clause or deletes all the row s from the table if no condition is specified. But it does not free the space containing the
table.

(ii) TRUNCATE:
The TRUNCATE command is used to delete all the row’s, the structure remains in the table and free the space containing the table.

(iii) DROP:
The DROP command is used to remove an object from the database. If you drop a table, all the rows in the table is deleted and the table structure is removed from the database. Once a table is dropped we cannot get it back.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 33.
List the different data types used in SQL
Answer:

  1. char (character)
  2. varchar
  3. dec (Decimal)
  4. numeric
  5. int (integer)
  6. small int
  7. float
  8. Real
  9. Double

Question 34.
Write the different types of SQL commands.
Answer:

  1. DDL – Data Definition Language
  2. DML – Data Manipulation Language
  3. DCL – Data Control Language
  4. TCL – Transaction Control Language
  5. DQL – Data Query Language

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 35.
What are the various processing skills of SQL?
Answer:
The various processing skills of SQL are :

(i) Data Definition Language (DDL):
Theb SQL DDL provides commands for defining relation schemas (structure), deleting relations, creating indexes and modifying relation schemas.

(ii) Data Manipulation Language (DML):
The SQL DML includes commands to insert.delete, and modify tuples in the database.

(iii) Embedded Data Manipulation Language:
The embedded form of SQL is used in high level programming languages.

(iv) View Definition:
The SQL also includes commands for defining views of tables.

(v) Authorization:
The SQL includes
commands for access rights to relations and views of tables.

(vi) Integrity:
The SQL provides forms for integrity checking using condition.

(vii) Transaction control:
The SQL includes commands for file transactions and control over transaction processing.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 36.
Explain Any 5 data types?
Answer:
(i) char(Character):
Fixed width string value. Values of this type is enclosed in single quotes. Eg:Anu’s will be written
as ‘Anu’ ‘s’.

(ii) varchar:
Variable width character string. This is similar to char except the size of the data entry vary considerably.

(iii) numeric:
It is same as decimal except that the maximum number of digits may not exceed the precision argument.

(iv) int(Integer):
It represents a number without a decimal point. Here the size argument is not used.

(v) float:
It represents a floating point number in base 10 exponential notation and may define a precision up to a maximum of 64.

Question 37.
What is the role of SQL in RDBMS?
Answer:
(i) RDBMS stands for Relational Data Base Management System. Oracle, MySQL, MS SQL server, IBMDB2 and Microsoft Access are RDBMS packages.
(ii) Database is a collection of tables that store set of data that can be queried for use in other applications.
(iii) A Database Management System supports the development, Administration and use of database platforms.
(iv) The data in RDBMS, is stored in data base objects, called tables. A Table is a collection of related data entries and it consist of row and columns.
(v) A field is a column in a table that is designed to maintain specific related information about every records in the table.
(vi) A Record is a row, which is a collection of related fields or columns that exist in a table.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 38.
Write a query that selects all students whose age is less than 18 in order wise.
Answer:
SELECT * Name, Age FROM Student WHERE Age < 18 ORDER BY Name ASC;
Where
Student – Name of the file name.
ASC – Ascending order (Name column)

Question 39.
Differentiate Unique and Primary Key constraint.
Answer:

Unique Primary Key
Unique constraint ensures that no two rows have the same value in the specified columns.Primary key constraint declares a field as a primary key which helps to uniquely identify a record.
The unique constraint can be applied only to fields that have also been declared as NOT NULL.The primary key does not allow NULL values and therefore a field declared as primary key must have the NOT NULL constraint.

Question 40.
Write the difference between constraint and column constraint?
Answer:

Table constraint Column constraint
When the constraint is applied to a group of fields of the table, it is known as Table constraint.The table constraint is normally given at the end of the table definition.
The table constraint is normally given at the end of the table definition.When we define a check constraint on a single column.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 41.
Which component of SQL lets insert values in tables and which lets to create a table?
Answer:
The INSERT command helps to add new data to the database or add new records to the table. The command is
INSERT INTO <table name> [column-list] VALUES (values);
The CREATE TABLE command to add values into the table. The order of values must match the order of columns in the command.

Question 42.
What is the difference between SQL and MySQL?
Answer:

SQL

 MySQL

SQL – Structured Query Language is a language used for accessing databases.MySQL is a database management system like SQL server.
SQL allows user to create, retrieve, alter and transfer information among databases.MySQL is a RDBMS, it is language designed for managing and accessing data in a Relational Database management svstem.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 43.
What is a constraint? Write short note on Primary key constraint.
Answer:

  1. Constraint is a limit to the data or type of data that can be inserted, updated, or deleted from a table.
  2. The whole purpose of constraints is to maintain the data integrity.
  3. A primary key constraint which helps to uniquely identify a record.
  4. It is similar to unique constraint except that only field of a table can be set as primary key.
  5. The primary key does not allow NULL values.

Question 44.
Write a SQL statement to modify the student table structure by adding a new field.
Answer:

  1. The ALTER command is used to modify the student table structure.
  2. The syntax is ALTER TABLE <table name> ADD <column namexdata type><size>;
  3. To add a new column ‘Address’ of type ‘char’ to the student table, the command is used as ALTER TABLE student ADD Address char;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 45.
Write any three DDL commands.
Answer:
(i) CREATE TABLE:
When using this command a table is created, its columns are named, data types and sizes are to be specified.

(ii) ALTER:
This command is used to alter the table structure like adding a column, renaming the existing column, change the data type of any column or size of the column or delete the column from the table.

(iii) DRQP TABLE:
This DDL command is used to remove a table from the database. When we use DROP TABLE command carefully because we cannot get removed table back.

Question 46.
Write the use of Savepoint command with an example.
Answer:
(i) The SAVEPOINT command is used to temporarily save a transaction so that you can roll back to the point whenever required.
(ii) The different states of our table can be saved at any time using different names and the rollback to that state can be done using the ROLLBACK command.
SAVEPOINT savepoint_Name;
Eg:
INSERT INTO STUDENT VALUES (1001, ‘ARUN’, ‘M’, ‘46’, ‘OOTY’);
SAVEPOINT A;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 47.
Write a SQL statement using DISTINCT keyword.
Answer:
The DISTINCT keyword is used along with the SELECT command to eliminate duplicate rows in the table. This command helps to eliminate redundant data.
Eg:
SELECT DISTINCT place FROM student;
In this example, the keyword DISTINCT is used, only one NULL value is returned, even if more NULL values occur.

Question 48.
Write the different types of constraints and their functions.
Answer:
Constraints ensure database integrity. The different types of constraints are unique constraint, primary key constraint, Default constraint and check constraint.

(i) Unique constraint:
This constraint ensures that no two rows have the same values in the specified columns. The UNIQUE constraint can be applied only to fields that have also been declared as NOT NULL.

(ii) Primary key constraint:
This constraint declares a field as a primary key which helps to unique identify a record. The primary key does not allow NULL values and therefore a field declared as primary key must have the NOT NULL constraint.

(iii) DEFAULT constraint:
The DEFAULT constraint is used to assign a default value for the field. When no value is given for the specified field having DEFAULT constraint, automatically the default value will be assigned to the field.

(iv) CHECK constraint:
This constraint helps to set a limit value placed for a field. When we define a check constraint on a single column, it allows only the restricted values on that field.

(v) TABLE constraint:
When the constraint is applied to a group of fields of the table, it is known as Table constraint. The Table constraint is normally given at the end of the table definition.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 49.
Consider the following employee table. Write SQL commands for the qtns.(i) to (v)
Answer:

TN State Board 12th Computer Science Important Questions Chapter 12 Structured Query Language (SQL) 1

TN State Board 12th Computer Science Important Questions Chapter 12 Structured Query Language (SQL) 2

(i) To display the details of all employees in descending order of pay.
(ii) To display all employees whose allowance is between 5000 and 7000.
(iii) To remove the employees who are mechanic.
(iv) To add a new row.
(v) To display the details of all employees who are operators.

(i) SELECT*FROM employee ORDER BY PAY DESC;
(ii) SELECT*FROM employee WHERE ‘ (Allowance > 5000 AND Allowance < 7000);
(iii) DELETE*FROM employee WHERE ’ DESIG – “Mechanic”;
(iv) INSERT INTO employee (EMP CODE, NAME, DESIG, PAY ALLOWANCE) VALDES (Ml006, TIARL, ‘Mechanic’, 22000, 7500);
(v) SELECT*FROM employee WHERE DESIG – “operator”;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 50.
What are the components of SQL? Write the commands in each.
Answer:
Components of SQL are divided by Five categories. They are
(i) DML Data Manipulation Language.
INSERT command helps to add new data , to the database or add new records to the table.

(ii) DDL- Data Definition Language.
ALTER command is used to alter the structure like adding a column, renaming the existing column etc.

(iii) DCL- Data Control Language.
GRANT command give user’s access privileges to database.

(iv) TCL Transaction Control Language.
COMMIT command is usecko permanently save any transaction to the database.

(v) DQL- Data Query Language.
SELECT command is used to query or retrieve data from a table in the database.

Question 51.
Construct the following SQL statements in the student table.
Answer:
(i) SELECT statement using GROUP BY Clause.
The group by clause is used with the SELECT statement to group the students on rows or columns having identical values or divide the table into groups.
The syntax for the GROUP BY Clause is SELECT <column – names> FROM <Table – name> GROUP BY<column-Name> HAVING <condition>
To apply the above command on the student table.
SELECT Gender FROM Student GROUP By Gender.

(ii) SELECT statement using ORDER BY Gender.
The ORDER By clause is SQL is used to sort the data in either ascending or descending based on one or more columns.
The syntax for the ORDER By clause is
SELECT < column – name >[,< column – name >, …] FROM <table name > ORDER BY < column 1 >, < column 2 >,… ASC / DESC;
To apply the above command on the student table.
SELECT * FROM Student ORDER BY Gender.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 52.
Write a SQL statement to create a table for employee having any five fields and create a table constiaint for the employee table.
Answer:
CREATE TABLE Employee
(
Employee Number NOT NULL PRIMARY KEY,
Emp Name char (25) NOT NULL,
Gender char (1),
EmpDesig char (10),
Age integer DEFAULT = “18”,
Salary (CHECK < = 20000),
);

Question 53.
Create a query of the student table in the following order of fields name, age, place and adm no.
Answer:
#Create a database
CREATE TABLE student
( name varchar (20) NOT NULL
Age int NOT NULL
place char(20)
Adm No int NOT NULL
Primary key (Adm No)
);
#Using SELECT command
SELECT AdmNo, name FROM student;
This command will display All name and Admission Number from student database.
SELECT * FROM student;
This command will display all the fields and rows of the table from student database.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 54.
Create a query to display the student table with students of age more than 18 with unique city.
Answer:
SELECT Adm no, name, Age, place FROM student WHERE (Age > 18 AND Place = “CHENNAI”);

Question 55.
Create a employee table with the following fields employee number, employee name, designation, date of joining and basic pay.
Answer:
CREATE TABLE employee
(
Emp No int (5)
NOT NULL . PRIMARY KEY
EmpName char (20),
EmpDESIG char (10),
EmPDOJ char (8),
EmPBP int (10),
);

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 56.
In the above table set the employee number as primary key and check for NULL values in any field.
Answer:
Emp No int (5) PRIMARY KEY,
SELECT * FROM employee WHERE EmPBP IS NULL;
EmPBP field can be searched in a employee .table, list all the employees whose Basic pay (EmPBP); Contains no value.

Question 57.
Prepare a list of all employees who are of managers.
Answer:
SELECT * FROM employee WHERE EmPDESIG = “MANAGER”;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Choose the correct answer:

Question 1.
The data in RDBMS, is stored in database objects, called:
(a) Tables
(b) Columns
(c) Rows
(d) Fields
Answer:
(a) Tables

Question 2.
Which skills the SQL provides forms for checking using condition?
(a) View
(b) Integrity
(c) Authorization
(d) Transaction control
Answer:
(b) Integrity

Question 3.
MySQL is a:
(a) SQL
(b) System software
(c) RDBMS
(d) High level language
Answer:
(c) RDBMS

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 4.
LAMP is a:
(a) Serve live website key
(b) Data Definition Language
(c) Data Manipulation Language
(d) Government website
Answer:
(a) Serve live website key

Question 5.
Which command is used to remove all records from a table, also release space occupied by those records? placed for a field?
(a) Create
(b) Alter
(c) Drop
(d) Truncate
Answer:
(d) Truncate

Question 6.
Which command is used delete all records from a table, but not the space occupied by them?
(a) Delete
(b) Alter
(c) Drop
(d) Truncate
Answer:
(a) Delete

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 7.
Which command is used to save anytransaction into the database permanently?
(a) Grant
(b) Commit
(c) Rollback
(d) Savepoint
Answer:
(b) Commit

Question 8.
Which command is used Restore the database to last commit state?
(a) Grant
(b) Commit
(c) Rollback
(d) Savepoint
Answer:
(c) Rollback

Question 9.
Which command is used temporarily save a
transaction?
(a) Grant
(b) Commit
(c) Rollback
(d) Savepoint
Answer:
(d) Savepoint

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 10.
How many types of constraints ensure database integrity?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(c) 4

Question 11.
Which constraint can be applied only tofields?
(a) UNIQUE
(b) PRIMARY KEY
(c) DEFAULT
(d) CHECK
Answer:
(a) UNIQUE

Question 12.
Which constraint declares a field as a primary key?
(a) UNIQUE
(b) PRIMARY KEY
(c) DEFAULT
(d) CHECK
Answer:
(b) PRIMARY KEY

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 13.
Which constraint helps to set a limit value placed for a field?
(a) UNIQUE
(b) PRIMARY KEY
(c) DEFAULT
(d) CHECK
Answer:
(d) CHECK

Question 14.
Which constraint is applied to a group fields?
(a) UNIQUE
(b) TABLE
(c) DEFAULT
(d) CHECK
Answer:
(b) TABLE

Question 15.
Which DML command helps to add new data to the database?
(a) INSERT
(b) UPDATE
(c) ALTER
(d) DROP
Answer:
(a) INSERT

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 16.
Which keyword is used to update multiple fields?
(a) ALTER
(b) SET
(e) DROP
(d) INSERT
Answer:
(b) SET

Question 17.
Which DDL command can also be used to remove all columns?
(a) ALTER
(b) DROP
(e) DELETE
(d) TRUNCATE
Answer:
(a) ALTER

Question 18.
Which DDL command deletes only the rows, from the table?
(a) DELETE
(b) TRUNCATE
(c) DROP
(d) REMOVE
Answer:
(a) DELETE

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 19.
Which DDL command is used to delete all the rows, the structure remains in the table?
(a) DELETE
(b) TRUNCATE
(e) DROP
(d) REMOVE
Answer:
(b) TRUNCATE

Question 20.
Which DDL command is used to remove an object from the database?
(a) DELETE
(b) TRUNCATE
(c) DROP
(d) REMOVE
Answer:
(c) DROP

Question 21.
Which DQL command helps to eliminate duplicate rows in the Table?
(a) DISTINCT
(b) ALL
(c) BETWEEN
(d) IN
Answer:
(a) DISTINCT

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 22.
Which DQL keyword retains duplicate rows?
(a) DISTINCT
(b) ALL
(c) BETWEEN
(d) IN
Answer:
(b) ALL

Question 23.
Which DQL keyword defines a range of values?
(a) DISTINCT
(b) ALL
(c) BETWEEN
(d) IN
Answer:
(c) BETWEEN

Question 24.
Which DQL keyword is used to specify a list of values which must be matched with the record values?
(a) DISTINCT
(b) ALL
(c) BETWEEN
(d) IN
Answer:
(d) IN

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 25.
Which DQL clause in SQL is used to sort the data in either ascending or descending?
(a) DISTINCT
(b) ALL
(c) IN
(d) ORDER BY
Answer:
(d) ORDER BY

Question 26.
Which DQL clause is used to filter the records?
(a) WHERE
(b) ALL
(c) IN
(d) ORDER BY
Answer:
(a) WHERE

Question 27.
Match The Following:

(i) SQL (A) RDBMS
(ii) IBMDB2 (B) Data Manipulation Language
(iii) DDL (C) Database
(iv) DML (D) Data Definition Language

(a) (i) – C, (ii) – A, (iii) – D , (iv) – B
(b) (i) – B, (ii) – C, (iii) – D, (iv) – A
(c) (i) – B, (ii) – D, (iii) – A, (iv) – C
(d) (i) – B, (ii) – A, (iii) – C, (iv) – D
Answer:
(a) (i) – C, (ii) – A, (iii) – D , (iv) – B

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 28.
Match the following:

(i) object (A) Field
(ii) column (B) Record
(iii) row (C) Database
(iv) tables (D) Tables

(a) (i) – D, (ii) – A, (iii) – B, (iv) – C
(b) (i) – D, (ii) – C, (iii) – B, (iv) – A
(c) (i) – C, (ii) – B, (iii) – D, (iv) – A
(d) (i) – C, (ii) – B, (iii) – A, (iv) – D
Answer:
(a) (i) – D, (ii) – A, (iii) – B, (iv) – C

Question 29.
Match the following:

(i) Alter (A) DML command
(ii) Update (B) DDL command
(iii) Commit (C) DQL command
(iv) SELECT (D) TCL command

(a) (i) – B, (ii) – D, (iii) – C, (iv) – A
(b) (i) – B, (ii) – A, (iii) – D, (iv) – C
(c) (i) – D, (ii) – C, (iii) – A, (iv) – B
(d) (i) – D, (ii) – A, (iii) – B, (iv) – C
Answer:
(b) (i) – B, (ii) – A, (iii) – D, (iv) – C

Question 30.
Match the following:

(i) ALTER (A) Delete only Row
(ii) DELETE (B) Delete Table
(iii) TRUNCATE (C) Delete Column
(iv) DROP (D) Delete All Row

(a) (i) – C, (ii) – B, (iii) – D, (iv) – A
(b) (i) – B, (ii) – C, (iii) – D, (iv) – A
(c) (i) – C, (ii) – A, (iii) – D, (iv) – B
(d) (i) – B, (ii) – D, (iii) – A, (iv) – C
Answer:
(c) (i) – C, (ii) – A, (iii) – D, (iv) – B

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 31.
Match the following:

(i) DISTINCT (A) List of values
(ii) ALL (B) range of values
(iii) IN (C) retain duplicate row
(iv) BETWEEN (D) eliminate duplicate row

(a) (i) – D, (ii) – A, (iii) – B, (iv) – C
(b) (i) – D, (ii) – C, (iii) – A, (iv) – B
(c) (i) – C, (ii) – A, (iii) – B, (iv) – D
(d) (i) – C, (ii) – B, (iii) – D, (iv) – A
Answer:
(b) (i) – D, (ii) – C, (iii) – A, (iv) – B

Question 32.
Choose the incorrect pair:
(a) HAVING – Group By
(b) COMMIT – Save
(c) ROLLBACK – Restore
(d) SAVEPOINT – Permanently save
Answer:
(d) SAVEPOINT – Permanently save

Question 33.
Choose the incorrect pair:
(a) DDL – Creation Tables
(b) DML – Insert data
(c) DCL – queries
(d) TCL – Transaction
Answer:
(c) DCL – queries

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 34.
Choose the incorrect pair:
(a) Object – Database
(b) RDBMS – DBMS
(c) Field – Column
(d) Record – Row
Answer:
(a) Object – Database

Question 35.
Choose the correct pair:
(a) char – Fixed width string
(b) int – with decimal
(c) small int – greater size
(d) varchar – Variable width Numeric
Answer:
(a) char – Fixed width string

Question 36.
Choose the correct pair:
(a) UNIQUE – NULL
(b) PRIMARY KEY – NOT NULL
(c) CHECK – default value
(d) TABLE – Single field
Answer:
(b) PRIMARY KEY – NOT NULL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 37.
Choose the incorrect statement:
(a) The DML commands consists of inserting, deleting and updating rows into the table.
(b) The INSERT command helps to add new data to the database.
(c) Delete command temporarily delete single row in the table.
(d) The UPDATE command updates some or all data values in a database.
Answer:
(c) Delete command temporarily delete single row in the table.

Question 38.
Choose the incorrect statement:
(a) The Alter command is used to alter the table structure.
(b) The Truncate command is used to delete single column from the table.
(c) DROP command is used to remove a Table.
(d) Delete command is used to delete all Rows from the table.
Answer:
(b) The Truncate command is used to delete single column from the table.

Question 39.
Choose the incorrect statement:
(a) DISTINCT keyword is used retains . duplicate rows.
(b) BETWEEN keyword defines a range of values.
(c) IN keyword is used to specify a list of values.
(d) WHERE clause is used to filter the records.
Answer:
(a) DISTINCT keyword is used retains . duplicate rows.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 40.
Choose the correct statement:
(a) The HAVING clause can be used along with GROUP BY clause in the SELECT statement.
(b) COMMIT command is to temporarily save to the memory.
(c) Rollback command deletes the database to the last committed state
(d) The SAVE POINT command is used to permanently save to the memory.
Answer:
(a) The HAVING clause can be used along with GROUP BY clause in the SELECT statement.

Question 41.
Choose the correct statement:
(a) Create Table command to create new row.
(b) The DCL provides authorization commands to access data.
(c) The TCL commands are used creation or deletion Tables.
(d) The DQL commands are used to insert, update and delete data of a Table.
Answer:
(b) The DCL provides authorization commands to access data.

Question 42.
Assertion (A):
The structured Query Language (SQL) is a standard programming language to access and manipulate databases.
Reason (R):
SQL allows the user to create, retrieve, alter and transfer information among databases.
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True but R is False.
(d) A is False but R is True.
Answer:
(a) Both A and R are True and R is the correct explanation for A.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 43.
Assertion (A):
RDBMS is a type of High level language with a row based table structure.
Reason (R):
A field is a Row, which collection of related fields.
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True but R is False.
(d) A is False but R is True.
Answer:
(d) A is False but R is True.

Question 44.
Assertion (A):
SQL is a language used for accessing database.
Reason (R):
Database is a group of files, it cannot be used other application.
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True but R is False.
(d) A is False but R is True.
Answer:
(d) A is False but R is True.

Question 45.
Assertion (A):
TABLE constraint is applied to a single field.
Reason (R):
The Table constraint is normally given at the end of the Table definition.
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True but R is False.
(d) A is False but R is True.
Answer:
(d) A is False but R is True.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 46.
Assertion (A):
The WHERE clause is used to filter the records.
Reason (R):
The ORDER BY sorts the data in either Ascending or Descending.
(a) Both A and R are True and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True but R is False.
(d) A is False but R is True.
Answer:
(b) Both A and R are True, but R is not the correct explanation for A.

Question 47.
Pick the odd one out.
(a) Oracle
(b) MySQL
(c) IBMDB2
(d) dbase
Answer:
(d) dbase

Question 48.
Pick the odd one out.
(a) INSERT
(b) Create
(c) Alter
(d) DROP
Answer:
(a) INSERT

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 49.
Pick the odd one out.
(a) Commit
(b) Grant
(c) Rollback
(d) save point
Answer:
(b) Grant

Question 50.
Pick the odd one out.
(a) Unique
(b) Default
(c) Check
(d) Alter
Answer:
(d) Alter

Question 51.
Pick the odd one out.
(a) Delete
(b) Select
(c) Truncate
(d) Drop
Answer:
(b) Select

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 52.
DDL stands for:
(a) Data Definition Language
(b) Data Declared Language
(c) Defined Data Language
(d) Data Declared language
Answer:
(a) Data Definition Language

Question 53.
DML stands for:
(a) Data Manipulation Language
(b) Data Memory Language
(c) Data Main Language
(d) Data Machine Language
Answer:
(a) Data Manipulation Language

Question 54.
DCL stands for:
(a) Data Control Language
(b) Dynamic Control Language
(c) Dynamic Center Language
(d) Data Communication Language
Answer:
(a) Data Control Language

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 55.
TCL stands for:
(a) Transmission Control Language
(b) Transfer Communication Language
(c) Transaction Control Language
(d) Transmission Center Language
Answer:
(b) Transfer Communication Language

Question 56.
How many types of database integrity constraints are there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(c) 4

Question 57.
Which of the following separated by multiple constraints?
(a) Comma
(b) Semicolon
(c) Colon
(d) Space
Answer:
(d) Space

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 58.
Which of the following constraints does not allow NULL values?
(a) Primary key
(b) Identifier
(c) Variables
(d) Unique
Answer:
(a) Primary key

Question 59.
Which of the following keywords shows that the field value cannot be empty ?
(a) No VALUE
(b) NOT NULL
(c) NULL
(d) O
Answer:
(b) NOT NULL

Question 60.
Which of the following Constraint is used to a group of field of the table?
(a) Constraint
(b) Unique
(c) Row
(d) Table
Answer:
(d) Table

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 61.
Which of the following keyword used to sort the records in ascending order?
(a) ASC
(b) ASCE
(c) ACE
(d) ASCEN
Answer:
(a) ASC

Question 62.
Which of the following keyword used to sort . the records in descending order?
(a) DESEN
(b) DESC
(c) DESE
(d) DES
Answer:
(b) DESC

Question 63.
Which of the following begin with a keyword and consists of keyword and argument?
(a) Clauses
(b) Key
(c) Statement
(d) Argument
Answer:
(a) Clauses

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 64.
Which commands provide definitions for creating table structure, deleting relations, and modifying relation schemas?
(a) DDL
(b) DML
(c) DCL
(d) DQL
Answer:
(a) DDL

Question 65.
Which command lets to change the structure of the table?
(a) SELECT
(b) ORDER BY
(c) MODIFY
(d) ALTER
Answer:
(d) ALTER

Question 66.
The command to delete a table is:
(a) DROP
(b) DELETE
(c) DELETE ALL
(d) ALTER TABLE
Answer:
(a) DROP

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 12 Structured Query Language (SQL)

Question 67.
Queries can be generated using:
(a) SELECT
(b) ORDER BY
(c) MODIFY
(d) ALTER
Answer:
(a) SELECT

Question 68.
The clause used to sort data in a database:
(a) SORT BY
(b) ORDER BY
(c) GROUP BY
(d) SELECT
Answer:
(b) ORDER BY

TN Board 12th Computer Science Important Questions

TN Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 1.
What is Text?
Answer:
Text is the basic components of multimedia and most common ways of communicating information to other person.

Question 2.
What is static text?
Answer:
Static text, the text or the words will remain static as a heading or in a line, or in paragraph.

Question 3.
What is a Hyper text?
Answer:
A Hyper text is a system which consists of nodes, the text and the links between the nodes, which defines the paths the user need to follow for the text access in non-sequential ways.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 4.
Differentiate path animation and frame animation.
Answer:

Path Animation Frame Animation
Path Animation involves moving an object on a screen that has a constant background. In Frame Animations, multiple objects are allowed to travel simultaneously.
A Cartoon character may move across the screen regardless of any change in the background. Background or the objects also change.

Question 5.
What is Decibels?
Answer:
Decibels is the measurement of volume, the pressure level of sound.

Question 6.
Differentiate Video and Analog video.
Answer:

Video Analog Video
Video is defined as the display of recorded event, scene etc., Analog video, the video data’s are stored in any non – computer media like video tape, laser disc, film etc.,
The video can be divided in two types as analog video and digital video. Analog video can be divided two types as composite and component analogue video.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 7.
What are the most commonly used text editors?
Answer:
The most commonly used text editors are Notepad (windows), Gedit or Nano (unix, linux), Text edit (mac OS X) and so on.

Question 8.
What are the areas work with JPEG format?
Answer:
The JPEG format works good with photographs, naturalistic artwork, and similar material but functions less on lettering, live drawings or simple cartoons.

Question 9.
What are the most common formats of wave files?
Answer:
The most common formats of wave files are .WAV, .MPEG, .MP3, .WMA and RA.

Question 10.
What are uses of PNG format?
Answer:
PNG acts as replacement for GIF and also replaces multiple common uses of TIFF.
PNG works good with online viewing applications like World Wide Web.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 11.
What is project design objectives?
Answer:
The specific statements in the project is known as the objectives.
Activities are series of action performed to implement an objective.

Question 12.
What are phases of budgeting in multimedia production?
Answer:
Budgeting for each phases like consultants, hardware, software, travel, communication and publishing is estimated for all the multimedia projects.

Question 13.
Define the content.
Answer:
Content is the “stuff” provided by content specialist to the multimedia architect with which the application is developed, who prepares the narration, bullets, charts and tables etc.,

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 14.
Define structure in multimedia production.
Answer:
The structure defines the activities, responsible person for each activity and the start / end time for each activity.

Question 15.
What are production activities?
Answer:
Text is incorporated using OCR software, pictures shot by digital camera, video clips are shot, edited and compressed. A pilot project is ready by this time.

Question 16.
What are most popular Internet Browsers?
Answer:
The most popular Browsers are Internet Explorer, Chrome, Mozilla Firefox and Netscape Navigator.

Question 17.
What are natural works for multimedia architect.
Answer:
The multimedia architect integrates all the multimedia building blocks like graphics, text, audio, music, video, photos and animation by using an authoring software.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 18.
Write different ways for teaching and learning using multimedia.
Answer:
In India, multimedia is used in different ways for teaching and learning like e-leaming, distance learning, virtual learning and so on. Education satellite (EDUSAT) is launched in India for serving the educational sector of the country.

Question 19.
What are entertainment mode using multimedia technology?
Answer:
The Multimedia Technology is needed in all mode of entertainment like Radio, TV, online gaming, Social Media, video on demand etc.,

Question 20.
What are the areas used multimedia applications?
Answer:
Multimedia used in many public places like Trade Shows, Libraries, Railway Stations, Museums, Malls, Airports, Banks, Hotels Exhibitions in the form of kiosks.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 21.
What is Kiosk?
Answer:
Kiosk is a free-standing furnished equipped multimedia computer that allows users to retrieve information via a touch screen.

Question 22.
What are information presented by kiosk?
Answer:
The information presented in kiosk are enriched with animation, video, still pictures, graphics, diagrams, maps, audio and text. Banks uses kiosk in the form of ATM machines.

Question 23.
What is web casting?
Answer:
The live telecast of real time programs through internet is known as webcasting.

Question 24.
What is video conferencing?
Answer:
Video conferencing is the process of conducting conference between more than two participants at different place by using computer networks to transmit audio and video data.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 25.
Write short note on user orientation program.
Answer:
The role of multimedia plays an vital role in training the librarians in schools, colleges and universities due to its interactivity. Hence, it is used in depth subject training to their facilities.

Question 26.
Hyper text system is flexible and more sophisticated – Explain.
Answer:

  • The author of the working system created this system. The user is permitted to define their own paths in more sophisticated hypertext system.
  • The user is provided with the flexibility and choice to navigate in hypertext. The readability of the text depends on the spacing and punctuation.
  • The message communication is more appropriate with improved fonts and styles.

Question 27.
Explain sampled sound is a digitized sound in digital audio.
Answer:

  • A sample of sound is taken and stored every fraction of a second as digital information in bits and bytes.
  • The quality of this recording depends on the sampling rate.
  • Sampling rate is defined as how often the samples are taken and how many numbers are used to represent the value of each sample (bit depth, resolution and sample size).
  • The finer the quality of captured sound and the resolution is achieved while played back, when more often the sample is taken and the more data is stored about the sample.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 28.
Write about the user documentation is a mandatory in multimedia production.
Answer:

  • User documentation is a mandatory feature of all multimedia projects.
  • The documentation has all the valuable information’s starting from the system requirement till the completion of testing.
  • Contact details, e-mail address and phone numbers are provided for technical support and sending suggestions and comments.

Question 29.
Write the important role of production manager in multimedia?
Answer:

  • The role of Production Manager is to define and coordinate, the production of the multimedia Project in time and with full quality.
  • The Production Manager should be an expertise in the technology expert, good at proposal writing, good communication skills and budget management skills.
  • Also must have experience in Human Resource Management and act as an efficient team leader.

Question 30.
Write the responsibility of the web master.
Answer:

  • The responsibility of the web master is to create and maintain an internet web pages.
  • They converts a multimedia presentation into a web page.
  • Final multimedia product is ready for consultation is a joint effort of the entire team.
  • Initially, the production manager identifies the project content, while the web master provides access to a wide range of community through web services.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 31.
Write about major application have been developed with the integration of Internet and multimedia.
Answer:

  • Major application have been developed with the integration of Internet and Multimedia like Maps, Media rich blogs etc.
  • A comprehensive study on use of Internet and multimedia in USA says that an estimated 55 million consumers use Internet radio and video services each month.
  • Image is the most widely used multimedia resource on internet.
  • Social networking sites like faceboOk also enables multimedia rich contents to be exchanged online.

Question 32.
Write short notes on In-house production of Multimedia Resources and E-publishing.
Answer:

  • Many libraries produce multimedia resources in-house, to serve the parent organization.
  • Introduction of CD / DVD and their writers has solved few of the problems of libraries in storing or achieving the materials.
  • Multimedia tools along with CD-writers is made possible to publish information from different sources in a most easy to use and acceptable form to library users.

Question 33.
Write about digital multimedia libraries.
Answer:
. Information’s are available in digital formats that include digital books, scanned images, graphics and digitized audio – visual clips etc.
. Initially digital library projects were based only on textual data.
. Later it was all other media elements like images, audio and video recordings were also integrated under the collection of digital library.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 34.
Describe the features of MPEG format.
Answer:
MPEG (Moving Picture Experts Group) is a standard for generating digital video and audio compression under the International Standards Organization (ISO) by the group of people.

The group has developed MPEG-1, the standard on which video CD and MP3 are based, MPEG-2, the standard that supports products as digital television set top boxes and DVD, MPEG-4, the standard for multimedia and mobile web.

MPEG-7, the standard for search of audio and visual content. Research on MPEG-21 “Multimedia frame work” has started in 2000. MPEG is the standards for digital video and audio compression.

Question 35.
Briefly explain about applications of multimedia.
Answer:
Predominantly, entertainment and education are the fields where multimedia is used in majority.
Education:
Multimedia plays an vital role in offering an excellent alternative method to traditional teaching.
Many educators accepts multimedia introduces new ways of thinking in the classroom.

EDUSAT (Education satellite) is launched in India for serving the educational sector of the country for emulating virtual class room in an effective manner.

Entertainment:
Multimedia technology is needed in all mode of entertainment like Ratio, TV, online gaming, Video on demand etc.,

Business system:
The marketing and advertising agencies are using animation techniques for sales promotion.
Cell phone, Personal Digital Assistant, Bluetooth and Wi-Fi communication technology makes multimedia communication for business more efficiently.

Medical services:
Medical services are grown drastically with the development of multimedia.
Medical students practices surgery methods via simulation prior to actual surgery.

Public places:
Multimedia is available in many public places like trade shows, libraries, railway stations, museums, malls, airports, banks, hotels, and exhibitions in the form of kiosks. It provides information to the customers and helps them.

Multimedia conferencing:
Multimedia conferencing or video conferencing is a system that performs face-to-face interactions among participating users, located far from each other, as if they were sitting and discussing in a single room.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 36.
Explain detail about multimedia kiosk.
Answer:

  1. Kiosk is a free – standing furnished equipped multimedia computer that allow users to retrieve information via a touch screen.
  2. It is commonly used in airports and other public locations to provide directions and few mandatory information’s.
  3. In an library, kiosk is usually located near the entrance of the library, used for displaying announcements, reading lists, comments and suggestions from library users and other information’s about operations and programs of the library.
  4. Kiosk provides information to the customers and help them.
  5. The information presented in kiosk are enriched with animation, video, still pictures, graphics, diagrams, maps, audio and text. Banks users kiosks in the form of ATM machines.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 37.
Define Multimedia and their features.
Answer:

  1. The term multimedia comprises of two words multi and media which means that multiple forms of media are combined together.
  2. Multimedia features like storage, communication, presentation and Input / output interactions of text, video, image, graphics and audio.

Question 38.
List out Multimedia Components.
Answer:
Multimedia has five major components like text, images, sound, video, and Animation.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 39.
Classify the TEXT component in multimedia.
Answer:
The TEXT component are Static Text and Hyper Text.
Static Text: The Text or the words will remain static as a heading or in a line,, or in a paragraph.
Hyper Text: A system which consists of nodes, the text and the links between the nodes, which defines the paths the user need to follow for the text access in non-sequential ways.

Question 40.
Classify the IMAGE component in multimedia.
Answer:
The IMAGE components are Bitmap or Raster and Vector.
Bitmap or Raster:
The common and comprehensive form of storing images in a computer is Raster or Bitmap image.

Vector:
Drawing elements or objects such as lines, rectangles, circles and so on to create an images are based on vector images.

Question 41.
Define Animation and their features.
Answer:

  1. Animation is the process displaying still images so quickly so that they give the impression of continuous movement.
  2. Path animation involves moving an object on a screen that has a constant background.
  3. In frame Animations, multiple objects are allowed to travel simultaneously.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 42.
List out image file formats.
Answer:

  1. TIFF – Tagged Image File Format.
  2. BMP – BitMap
  3. DIB – Device Independent Bitmap.
  4. GIF – Graphics Interchange Format.
  5. JPEG – Joint Photographic Experts Group.
  6. TGA – Tagra
  7. PNG – Portable Network Graphics.

Question 43.
List out audio file formats.
Answer:

  1. WAV – Waveform Audio File Format.
  2. MP3 – MPEG Layer-3 Format.
  3. OGG – OGG container Format.
  4. AIFF – Audio Interchange File Format.
  5. WMA – Windows Media Audio.
  6. RA – Real Audio Format.

Question 44.
List out video file formats.
Answer:

  • AVI – Audio / Video Interleave.
  • MPEG – Moving Picture Experts Group.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 45.
Define Multimedia Production.
Answer:
Adequate time and efficient planning is required for multimedia production, which assures that the proj ect will be proceed smoothly and certainly ensures that the information reaches the target audience.

Question 46.
List out Multimedia Production team members.
Answer:
Production manager, content specialist, script writer, text editor, multimedia architect, computer graphic artist, audio and video specialist, computer programmer and web master.

Question 47.
Briefly explain about Multimedia Components.
Answer:

  • Multimedia has five major components like text, images, sound, video, and animation.
  • Text is the basic components of multimedia and most common ways of communicating information to other person.
  • Images acts as an vital component in multimedia.
  • Sound is a meaningful speech in any language and is the most serious elements in multimedia, providing the pleasure of music, special effects and so on.
  • Video is the powerful way to convey information in multimedia applications are embedding of video.
  • Animation is the process displaying still images so quickly so that they give the impression of continuous movement.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 48.
Describe the features and techniques of animation.
Answer:

  1. Animation may be in two or three dimensional.
  2. The two dimensional animation, bring an image alive, that occur on the flat X and Y axis of the screen.
  3. The Three dimensional animation it occurs along the three axis X, Y and Z.
  4. Path type animation involves moving an object on a screen that has a ‘ constant background.
  5. In frame animations, multiple objects are allowed to travel simultaneously and the background or the objects also changes.

Question 49.
Write roles and responsibilities of Production team members.
Answer:
Production Manager:
He should be an expertise in the technology expert, good a proposal writing, Communication skills, Budget management skills and Human resources management.

Content Specialist:
He is responsible for performing all research activities concerned with the proposed application’s content.

Script Writer:
The script writer visualizes the concepts in three dimensional environments.

Text Editor:
He is responsible for the text should always be structured and correct grammatically.

Multimedia Architect:
The multimedia architect integrates all the multi¬media building blocks.

Computer Graphic Artist:
The role of Computer Graphic Artist is to deal with the graphic elements of the programs.

Audio and Video Specialist:
He is dealing with narration and digitized videos to be added in multimedia.

Computer Programmer:
He writes the programme code or scripts in the relevant language.

Web Master:
He is responsibility of the web master is to create and maintain an Internet web page.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 50.
Describe the various file formats in multimedia.
Answer:
The various file formats in multimedia are Text formats, Image formats, Digital Audio file formats and Digital video file format.

Text format:
It is primary file format and can be opened, read, and edited with most text editors. The most commonly used text formats are RTF (Rich Text Format), and plain text.

Image formats:
This format is common in desktop publishing world and is supported by almost all software packages. The most commonly used Image formats are BMP, DIB, GIF, JPEG, TGA, and PNG.

Digital Audio File Formats:
This is most popular audio file format in windows for storing uncompressed sound files. The most commonly used Digital Audio File Formats are WAV, MP3, OGG, AIFF, WMA, and RA. Digital Video File Formats: This file format for sound and pictures elements are stored and generating digital video and audio compression under the International Standards Organization (ISO) by the group of people. The most commonly used digital video file formats are AVI and MPEG.

Question 51.
Explain animation industry and their scope.
Answer:

  1. The animation industry in India is expected to grow at a pace faster than the IT industry’s.
  2. There are many number of institutes in all major cities and towns of India, both private and Government for providing training in animation, graphics and multimedia.
  3. As of 2015, the animation industry has matured in India and has moved on from being just on outsourcing facility to a creator of indigenous intellectual property as well. There are more than 300 animation studios in India as of 2015.
  4. Career opportunities in animation sectors at large – Advertising, online and print News Media, Film and Television, Cartoon Production, Theater, Video Gaming and E – learning.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 52.
Explain in detail Process of Multimedia.
Answer:
The process behind Multimedia production. The following are the phases for
development of complex multimedia projects.
(i) Conceptual analysis and planning:
The process of multimedia making begins with a conceptual ignition point.

(ii) Project design:
Activities are series of actions performed to implement an objective. These activities contribute to the project design phase.

(iii) Pre – production:
Based on the planning and design. It is necessary to develop the project.

(iv) Budgeting:
Budgeting for each phases like consultants, hardware, software, travel, communication and publishing is estimated for all the multimedia projects.

(v) Multimedia production team:
The production team for a high end multimedia project requires a term efforts.

(vi) Hardware / software selection:
All the multimedia application requires, selection of suitable hardware devices and softwares.

(vii) Defining the content:
The application is developed, who prepares the narration, bullets, charts, and tables etc.,

(viii) Preparing the structure:
A detailed structure must have information about all the steps along with the time line of the future action.

(ix) Production:
This phase includes the activities like background music selection, sound recording and so on.

(x) Testing:
The complete testing of the pilot product is done before the mass production to ensure that everything is in place.

(xi) Documentation:
User documentation is a mandatory feature of all multimedia projects.

(xii) Delivering the multimedia product:
Multimedia applications are best delivered on CD / DVD or in the website.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 53.
Explain In detail Techniques of Animation.
Answer:
Animation may be in two or three dimensional. The two dimensional animation, bring an image alive, that occur on the flat X and Y axis on the screen. The three dimensional animation occurs along the three axis X, Y and Z. Animation tools are very powerful and effective.

The two basic techniques of animation are path animation and frame animation.

(i) Path animation:
It involves moving an object on a screen that has a constant background. Eg: Cartoons.

(ii) Frame animation:
It multiple objects are allowed to travel simultaneously and the background or the objects also changes.

Question 54.
Explore the opportunities Animation field movie industry.
Answer:

  1. In India, the VFX domain, or the animation and visual effects industry, has been growing stronger and stronger in recent years.
  2. Animation and visual effects requirements for massive international projects such as HBO’s top TV series and Marvel’s hits infinity war and black panther was outsourced to Indian companies in Mumbai and Pune.
  3. The surge in demand for animation and visual effects experts has led to a significant increase in the number of students enrolling for a VFX course.
  4. According to a FICCI – EY 2018 report, India’s animation and VFX industry is currently worth ₹ 80 billion and its expected to reach ₹ 114 billion over the next couple of years.
  5. As a student that completes a 3D animation course can hope to build a rewarding and satisfying career in the movie industry.
  6. Career opportunities in India for visual effects experts abound not only in the movie industry but also in other industries. Choose the right animation course to land a opportunities in their field of interest.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 55.
Explain in detail about production team Roles and Responsibilities.
Answer:
Managing team members in a way to get maximum outcome with high degree of efficiency is mandatory in multimedia production.
Production team roles and responsibilities are
(i) Production Manager:
The role of production manager is to define, and coordinate, the production of the multimedia project in time and with full quality. The production manager should be technology expert, good at proposal writing, good communication skills, budget management skills, and human resource management.

(ii) Content Specialist:
Content specialist is responsible for performing all research activities concerned with the proposal applicant’s content. Project content refers to projects information, graphics, data or facts presented through the multimedia production.

(iii) Script Writer:
The script writer visualizes the concepts in three dimensional environments and if needed uses the virtual reality integration into the program.

(iv) Text Editor:
The content of a multimedia production always must flow logically and the text should always be structured and correct grammatically.

(v) Multimedia Architect:
The multimedia architect integrates all the multimedia building blocks like graphics, text, audio, music, video, photos and animation by using an authoring software.

(vi) Computer Graphic Artist:
The role of computer graphic artist is to deal with the graphic elements of the programs like backgrounds, bullets, buttons, pictures editing, 3-D objects, animation, and logos etc.,

(vii) Audio and Video specialist:
The roles of these specialists are needed for dealing with narration and digitized videos to be added in a multimedia presentation. They are responsible for recording, editing, sound effects and digitizing.

(viii) Computer Programmer:
The computer programmer writes the lines of code or scripts in the appropriate language.

(ix) Web Master:
The responsibility of the web master is to create and maintain an Internet web page. They converts a multimedia presentation into a web page. Final multimedia product is ready for consultation is a joint effort of the entire team.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 56.
Explain about different file formats in multimedia files.
Answer:
The different file formats in multimedia are text formats, image formats, digital audio file formats, and digital video file formats.

(i) RTF (Rich Text Format): This is the primary file format with the specification of their published products and for cross – platform document interchange.
(ii) Plain Text: This file can be opened read, and edited with most text editors. Commonly used are notepad, gedit or nano, text edit and so on.

Image formats:
(i) TIFF (Tagged Image File Format):
This formats is common in desktop publishing world. Recent versions of TIFF allows image compression, and the format is comfortable for moving large files between computers.

(ii) BMP (BitMap):
This format is used for the high resolution or large images.

(iii) DIB (Device Independent BitMap):
This format which is similar to BMP, allows the files to be displayed on a variety of devices.

(iv) GIF (Graphics Interchange Format):
Most of the computer colour images and backgrounds are GIF files. It is the most popular format used for online colour photos and this format supported widely.

(v) JPEG (Joint Photographic Experts Group):
JPEG was designed to attain maximum image compression. It works good with photographs, naturalistic artwork, and similar material but functions less on lettering, live drawings or simple cartoons.

(vi) TGA (Tagra):
It is the first popular format for high resolution image. TGA ia supported by most of the video – capture boards.

(vii) PNG (Portable Network Graphics):
PNG acts as replacement for GIF and also replaces multiple common uses of TIFF.

(viii) Digital Audio File Formats:
(a) WAV (Waveform Audio File Format): It is the most popular audio file format in windows for storing uncompressed sound files.
(b) MP3 (MPEG Layer – 3 Format): MPEG Layer – 3 format is the most popular format for storing and downloading music.
(c) OGG: A free, open source container format that is designed for obtaining better streaming and evolving at high end quality digital multimedia.
(d) AIFF (Audio Interchange File Format): A standard audio file format used by Apple which is like a WAV file for the Mac.
(e) WMA (Windows Media Audio): It is a popular windows media audio format owned by Microsoft and designed with Digital Right Management (DRM) abilities for copyright protection.
(f) RA (Real Audio Format): Real Audio format is designed for streaming audio over the Internet.

(ix) Digital Video File Format:
(a) AVI (Audio/Video Interleave): AVI is the video file format for Windows, sound and picture elements are stored in alternate interleaved chunks in the file.
(b) MPEG (Moving Picture Experts Group): MPEG is a standard for generating digital video and audio compression under the International Standards Organization (ISO) by the group of people. MPEG is the standards for digital video and audio compression.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Choose the correct answer:

Question 1.
Which is the basic components of multimedia?
(a) Text
(b) Image
(c) Animation
(d) Sound
Answer:
(a) Text

Question 2.
How many are major components of multimedia?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(d) 5

Question 3.
Which is act as an vital components in multimedia?
(a) Text
(b) Image
(c) Animation
(d) Sound
Answer:
(b) Image

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 4.
Which is the common and comprehensive form of storing images in a computer?
(a) Bitmap
(b) RTF
(c) DIB
(d) GIF
Answer:
(a) Bitmap

Question 5.
Which is the measurement of volume, the pressure level of sound?
(a) Hertz
(b) Decibels
(c) Mhz
(d) Bit
Answer:
(b) Decibels

Question 6.
Which is a standard communication tool developed for computers and electronic instruments?
(a) RTF
(b) TIFF
(c) MIDI
(d) TGA
Answer:
(c) MIDI

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 7.
Which text format is the primary file format introduced by Microsoft?
(a) RITCH
(b) BMP
(c) DIB
(d) GIF
Answer:
(a) RITCH

Question 8.
Which format is common in desktop publishing world?
(a) TGA
(b) JPEG
(c) GIF
(d) TIFF
Answer:
(d) TIFF

Question 9.
Which format is used for the high – resolution or large images?
(a) DIB
(b) TGA
(c) BMP
(d) GIF
Answer:
(c) BMP

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 10.
Which format is to identify its colour values?
(a) DIB
(b) TGA
(c) BMP
(d) GIF
Answer:
(d) GIF

Question 11.
Which is the most popular audio file format in windows for storing uncompressed sound files?
(a) WAV
(b) MP3
(c) OGG
(d) WMA
Answer:
(a) WAV

Question 12.
Which format is standard audio file format used by Apple?
(a) WAV
(b) MP3
(c) OGG
(d) AIFF
Answer:
(d) AIFF

Question 13.
Which is the video file format for windows?
(a) AVI
(b) WMA
(c) RA
(d) OGG
Answer:
(a) AVI

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 14.
Which is a standard for generating digital video and audio compression under the International Standards Organization (ISO) by the group of people?
(a) OGG
(b) MP3
(c) MPEG
(d) AVI
Answer:
(c) MPEG

Question 15.
Who is integrates all the multimedia building blocks like graphics, text, audio, music, video, photos and animation by using authoring software?
(a) Multimedia architect
(b) Web master
(c) Computer programmer
(d) Computer graphic artist
Answer:
(a) Multimedia architect

Question 16.
Who is responsible to create and maintain an internet web page?
(a) Multimedia architect
(b) Web master
(c) Computer programmer
(d) Computer graphic artist
Answer:
(b) Web master

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 17.
Which is the most widely used multimedia resource on internet?
(a) Image
(b) Text
(c) Animation
(d) Sound
Answer:
(a) Image

Question 18.
Which is the most fast growing area in the field of information technology?
(a) Digital audio
(b) Multimedia
(c) Analog video
(d) Digital video
Answer:
(b) Multimedia

Question 19.
Which system is named, multimedia based teaching and learning?
(a) Audio
(b) Video
(c) MODULO
(d) Digital Audio
Answer:
(c) MODULO

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 20.
The name of the satellite is launched in India for serving the educational sector?
(a) EDUSAT
(b) INSATI
(c) Aryabhatta
(d) SATI
Answer:
(a) EDUSAT

Question 21.
_________ are stored in a central server and transmitted through a communication network.
(a) Radio
(b) Movies
(c) Audio
(d) e – learning
Answer:
(b) Movies

Question 22.
What is converts the digital information to analog signals and inputs it to the television set?
(a) Modem
(b) set – top box
(c) converter
(d) protocol
Answer:
(b) set – top box

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 23.
What are the communication technology makes multimedia communication for business more efficiently?
(a) Cell phone
(b) Bluetooth
(c) Wi-Fi
(d) All the above
Answer:
(d) All the above

Question 24.
Which is a free-standing furnished equipped multimedia computer that allow users to retrieve information via a touch screen?
(a) Kiosk
(b) ATM
(c) Computer
(d) Cell phone
Answer:
(a) Kiosk

Question 25.
Which of the following is not a hardware?
(a) CPU
(b) RAM
(c) Monitor
(d) AVI
Answer:
(d) AVI

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 26.
Match the following:

(A)Sound (i) Synthesizing
(B) MIDI (ii) display recorded
(C) Digital Audio (iii) Decibels
(D) Video (iv) bit depth

(a) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
(b) (A) – (iii); (B) – (iv); (C) – (ii); (D) – (i)
(c) (A) – (iv); (B) – (ii); (C) – (i); (D) – (iii)
(d) (A) – (iv); (B) – (i); (C) – (iii); (D) – (ii)
Answer:
(a) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)

Question 27.
Match the following:

(A) RTF (i) Windows
(B) TIFF (ii) variety devices
(C) BMP (iii) microsoft
(D) DIB (iv) Image compression

(a) (A) – (iii); (B) – (i); (C) – (ii); (D) – (iv)
(b) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)
(c) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(d) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
Answer:
(b) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)

Question 28.
Match the following:

(A) WAW (i) Music
(B) MP3 (ii) Convert to other file
(B) RA (iii) Video
(D) AVI (iv) Internet

(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (ii); (B) – (iv); (C) – (iii); (D) – (i)
(c) (A) – (iv); (B) – (iii); (C) – (i); (D) – (ii)
(d) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
Answer:
(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 29.
Match the following:

(A) RAM (i) browser
(B) stuff (ii) software
(C) OCR (iii) content
(D) chrome (iv) Hardware

(a) (A) – (iii); (B) – (iv); (C) – (ii); (D) – (i)
(b) (A) – (iii); (B) – (ii); (C) – (i); (D) – (iv)
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(d) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
Answer:
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)

Question 30.
Match the following:

(A) MODULO (i) Education satellite
(B) EDUSAT (ii) Teaching system
(C) Kiosk (iii) Social media
(D)Facebook (iv) Multimedia computer

(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (ii); (B) – (iv); (C) – (iii);(D) – (i)
(c) (A) – (iii); (B) – (iv); (C) – (ii); (D) – (i)
(d) (A) – (iii); (B) – (ii); (C) – (i); (D) – (iv)
Answer:
(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Question 31.
Assertion (A):
Multimedia is becoming more popular among the user in the terms of its uses and applications.
Reason (R):
Multimedia application plays vital role in terms of presenting information to the users.
(a) Both A and R are True, and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True, but R is false.
(d) A is false, but R is true.
Answer:
(a) Both A and R are True, and R is the correct explanation for A.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 32.
Assertion (A):
Static text, the text or the words will remain static as a heading or in a line, or in a paragraph.
Reason (R):
Text is the basic components used in multimedia.
(a) Both A and R are True, and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True, but R is false.
(d) A is false, but R is true.
Answer:
(b) Both A and R are True, but R is not the correct explanation for A.

Question 33.
Assertion (A):
Drawing elements or objects such as lines, rectangles, circles and so on to create an images are based on vector images.
Reason (R):
The disadvantage of vector image is relatively big amount of data is required to represent the image and there by large amount of memory is needed to store.
(a) Both A and R are True, and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True, but R is false.
(d) A is false, but R is true.
Answer:
(c) A is True, but R is false.

Question 34.
Assertion (A):
WAV is the most popular video file format in windows.
Reason (R):
MPEG format is the most popular format for storing and downloading music.
(a) Both A and R are True, and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True, but R is false.
(d) A is false, but R is true.
Answer:
(d) A is false, but R is true.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 35.
Assertion (A):
Kiosk is a laser printer.
Reason (R):
Kiosk is usually located in school library, used for displaying announcements.
(a) Both A and R are True, and R is the correct explanation for A.
(b) Both A and R are True, but R is not the correct explanation for A.
(c) A is True, but R is false.
(d) Both A and R are false.
Answer:
(d) Both A and R are false.

Question 36.
Choose the incorrect pair:
(a) Raster – Bitmap
(b) Vector – Draw
(c) Path animation – Moving object
(d) Frame animation – Single object
Answer:
(d) Frame animation – Single object

Question 37.
Choose the incorrect pair:
(a) Notepad – Google
(b) Gedit – Unix
(c) Nano – Linux
(d) Text edit – Mac OS
Answer:
(a) Notepad – Google

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 38.
Choose the incorrect pair:
(a) WAV – Audio
(b) RA – Video
(c) AIFF – Apple
(d) WMA – Microsoft
Answer:
(b) RA – Video

Question 39.
Choose the correct pair:
(a) RAM – Software
(b) Stuff – Content
(c) OCR – Hardware
(d) LAN – Browser
Answer:
(b) Stuff – Content

Question 40.
Choose the correct pair:
(a) Production manager – Technology Expert
(b) Text editor – Project
(c) Multimedia Architect – Editing
(d) Web master – Writes the code
Answer:
(a) Production manager – Technology Expert

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 41.
Choose the incorrect statement:
(a) Rich text format is the primary file format introduced in 1987 by microsoft.
(b) Plain text files can be opened, read, and edited with most text editors.
(c) TIFF format is common in desktop publishing world and it supported by almost all software packages.
(d) BMP (Bitmap) format is in use with Linux.
Answer:
(d) BMP (Bitmap) format is in use with Linux.

Question 42.
Choose the incorrect statement:
(a) PNG format works good with online viewing applications like World Wide Web.
(b) WAV is the most popular video file format in window for storing compressed sound files.
(c) OGG is a free open source container format.
(d) WMA is a popular windows media audio format owned by Microsoft.
Answer:
(b) WAV is the most popular video file format in window for storing compressed sound files.

Question 43.
Choose the incorrect statement:
(a) The process of multimedia making begins with a conceptual ignition point.
(b) The specific statements in the project is known as the objective.
(c) Multimedia applications are best delivered on pendrive.
(d) User documentation is a mandatory feature of all multimedia project.
Answer:
(c) Multimedia applications are best delivered on pendrive.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 44.
Choose the correct statement:
(a) Many educators accepts multimedia introduces new way of thinking in the classroom.
(b) EDUSAT is a e-leaming method.
(c) MODULO learning system was developed by France.
(d) Wi-Fi is a social media.
Answer:
(a) Many educators accepts multimedia introduces new way of thinking in the classroom.

Question 45.
Choose the correct statement:
(a) Kiosk is a type of animation software.
(b) Medical services are grown drastically with the development of multimedia.
(c) Multimedia is available only in malls.
(d) The live telecast through Internet is known as multimedia.
Answer:
(b) Medical services are grown drastically with the development of multimedia.

Question 46.
Pick the odd one out.
(a) text
(b) fonts
(c) image
(d) sound
Answer:
(b) fonts

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 47.
Pick the odd one out.
(a) GIF
(b) TIFF
(c) JPEG
(d) decibel
Answer:
(d) decibel

Question 48.
Pick the odd one out.
(a) RTF
(b) Notepad
(c) Gedit
(d) Text edit
Answer:
(a) RTF

Question 49.
Pick the odd one out.
(a) WAV
(b) DRM
(c) WMA
(d) RA
Answer:
(b) DRM

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 50.
Pick the odd one out.
(a) CD
(b) DVD
(c) OCR
(d) DISK
Answer:
(c) OCR

Question 51.
…………. refers to any type of application that involves more than one type of media such as text, graphics video animation and sound.
(a) an executable file
(b) desktop publishing
(c) multimedia
(d) hypertext
Answer:
(c) multimedia

Question 52.
One of the disadvantages of the multimedia is its:
(a) cost
(b) adaptability
(c) usability
(d) relativity
Answer:
(a) cost

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 53.
Expand JPEG:
(a) Joint Photo Experts Gross
(b) Joint Photographic Experts Group
(c) Joint Processor Experts Group
(d) Joint Photographic Expression Group
Answer:
(b) Joint Photographic Experts Group

Question 54.
You need hardware, software and to make multimedia.
(a) network
(b) compact disk drive
(c) good idea
(d) programming knowledge
Answer:
(c) good idea

Question 55.
Match the following by choosing the right one:

(A) Text (i) TGA
(B) Image (ii) MIDI
(C) Sound (iii) MPEG
(D) Video (iv) RTF

(a) (A) – (i); (B) – (ii); (C) – (iii); (D) – (iv)
(b) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(d) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)
Answer:
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 56.
Find the odd one on the following which is not an image format.
(a) TIFF
(b) BMP
(c) RTF
(d) JPEG
Answer:
(c) RTF

Question 57.
…………….. is the process displaying still images they give continuous movement.
(a) Text formats
(b) Sound
(c) MP3
(d) Animation
Answer:
(d) Animation

Question 58.
The live telecasting of real time program through Internet is known as:
(a) web casting
(b) web hosting
(c) data manipulation
(d) none of the above
Answer:
(a) web casting

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 1 Multimedia and Desktop Publishing

Question 59.
GIF use ………… color look up table.
(a) 13 bit
(b) 8 KB
(c) 8 MB
(d) 8 GB
Answer:
(a) 13 bit

Question 60.
RTF file format was introduced by:
(a) TCS
(b) Microsoft
(c) Apple
(d) IBM
Answer:
(b) Microsoft

TN Board 12th Computer Applications Important Questions

TN Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 1.
Write a any two notable features of good DBMS.
Answer:

  • Giving protection to data.
  • User-friendly for users are notable features of good DBMS.

Question 2.
What will be provides by DBMS?
Answer:
The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data.

Question 3.
What are various access methods in file system?
Answer:
The various access methods in file system were indexed, Random and sequential access.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 4.
What is mean by Data Duplication?
Answer:
Data Duplication mean, same data is used by multiple resources for processing, thus created copies of same data wasting the spaces.

Question 5.
What is Atomicity?
Answer:
An Atomicity follows the thumb rule “All or Nothing”, while updating the data in database for the user performing the update operation.

Question 6.
What is called update operation?
Answer:
The update operation is called as transaction and it either commits or aborts.

Question 7.
What is consistency?
Answer:
Consistency ensures that the changes in data value to be constant at any given instance. This property helps in the successful transaction.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 8.
What is known as concurrent Transactions?
Answer:
When multiple users do the transactions by accessing same object at the same time, the transaction is known as concurrent transaction.

Question 9.
What is Durability?
Answer:
Durability is defined as the system’s ability to recover all committed transactions during the failure of storage or the system.

Question 10.
What is Hierarchical Database Model?
Answer:
The Hierarchical Database Model was IMS (Information Management System), In this model each record has information in parent/child relationship like a tree structure.

Question 11.
What is advantage and Disadvantage of Hierarchical Database Model?
Answer:
Hierarchical Database Model have many advantages like less redundant data, efficient search, data integrity and security.
Disadvantage of this model has few limitations like complex to implement and difficultly in handling many to many relationships.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 12.
What is Network database Model?
Answer:
Network database model is similar to Hierarchical model except that in this model each member can have more than one owner. The many to many relationship are handled in a better way.

Question 13.
What are three database components identified by Network model?
Answer:
Network model identified the three database components, Network schema, Sub schema, and Language for data management.

Question 14.
What is major advantage and limitation of Network Model?
Answer:
The Major advantages of this model is the ability to handle more relationship types, easy data access, data integrity and Independence.
The limitation of network model is difficulty in design and maintenance.

Question 15.
Define Relational Model.
Answer:
Relational model is defined with two terminologies Instance and schema.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 16.
What are incorporates the object-oriented database model?
Answer:
The Object-oriented database model incorporates the combination of Object Oriented Programming (OOP’s) concepts and database technologies.

Question 17.
Define two terminologies of Relational Model.
Answer:
The two terminologies of Relational Model are

  • Instance – A table consisting of rows and columns.
  • Schema – Specifies the structure including name and type of each column.

Question 18.
What are advantage of object – oriented database model?
Answer:

  • The object-oriented database model efficiently manages large number of different data types.
  • Moreover complex behaviours are handled efficiently using OOP’s concepts.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 19.
What is known as Relational Database?
Answer:
Any database whose logical organization is based on relational data model is known as relational database.

Question 20.
What are basic RDBMS concept?
Answer:
The basic RDBMS concept includes Database, Tables, Tuple, Attribute, Schema, and Key.

Question 21.
What is a Table?
Answer:
A table is the simple representation of relations. The true relations cannot have duplicate rows where as the table can have.

Question 22.
What is a Column?
Answer:
Table can be divided into smaller parts, in terms of column. Each column is known a.s Attributes.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 23.
What is a Row?
Answer:

  • A single entry in a table is called as Row. Set of related data’s are represented in a row or tuple.
  • The Horizontal entity in a table is known as row or Record.

Question 24.
What is a primary key?
Answer:
A primary key is a special relational database table column designated to uniquely identify all table records.

Question 25.
What is a secondary key?
Answer:
An entity may have one or more choices for the primary key. One is selected as the primary key.
Those not selected are known as secondary keys.

Question 26.
What is composite Primary Key?
Answer:
A Primary Key which is a combination of more than one attribute is called a Composite Primary Key.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 27.
What is Foreign Key?
Answer:
A Foreign Key is a copy of the whole of its parent primary key.
Foreign Key values do not have to be unique. Foreign Keys can also be null.

Question 28.
What is super key?
Answer:
An attribute or group of attributes, which is sufficient to distinguish every tuple in the relation from every other one is known as super key.

Question 29.
What is Composite or Compound Key?
Answer:
A Key with more than one attribute to identify rows uniquely in a table is called composite key. This is also known as compound key.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 30.
What are basic concepts of ER Model?
Answer:

  • Entity or Entity type
  • Attributes
  • Relationship

Question 31.
What is an Entity?
Answer:
An Entity can be anything a real-world object or animation which is easily identifiable by anyone even by a common man.

Question 32.
What are types of Entity?
Answer:

  • Strong Entity,
  • Weak Entity,
  • Entity Instance.

Question 33.
What is strong Entity?
Answer:
A strong entity is the one which does not depend on any other entity on the schema or database and a strong entity will have a primary key with it.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 34.
What is Weak Entity?
Answer:
A Weak Entity is dependent on other entities and it does not have any primary key.

Question 35.
What is Instance?
Instance are the values for the entity.

Question 36.
What is Attribute?
Answer:
An attribute is the information about that entity and it will describe, quantify, qualify, classify, and specify and entity.

Question 37.
What is key Attribute?
Answer:
A key attribute describes a unique characteristic of an entity.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 38.
What is Simple Attribute?
Answer:
The simple attributes cannot be separated it will be having a single value for their entity.

Question 39.
What is Composite Attributes?
Answer:
The Composite Attributes can be sub divided into simple attributes without change in the meaning of that attribute.

Question 40.
What is single valued Attributes?
Answer:
A single valued attribute contains only one value for the attribute and they don’t have multiple numbers of values.

Question 41.
What is Multi valued Attributes?
Answer:
A Multivalued attribute has more than one value for that particular attribute.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 42.
What are components of ER Diagram?
Answer:
The components of ER Diagram are Entities, Attributes and Relationship.

Question 43.
Who was founded MySQL?
Answer:
MySQL is a database management system founded by Monty Widenius and is named after his daughter name My.

Question 44.
What are responsible have Database Administrator?
Answer:
Database Administrator (DBA), who takes care of Configuration, Installation, Performance, Security and Data Backup.

Question 45.
What are the skills needed by Database Administrator (DBA’s)?
Answer:
DBA’s posses the skills’on database design, database queries, RDMS, SQL and networking.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 46.
Write the types of software tools in the market to design the database.
Answer:
Many open source tools are available in the market to design the database in a better and efficient manner.
PhPMyAdmin is a most popular for web Administration. The Popular Desktop Application tools are MySQL workbench and HeidiSQL.

Question 47.
What is known as Designing of databases?
Answer:
The process of creating, implementing and maintaining the enterprise data in a system is known as Designing of databases.

Question 48.
Write the SQL DCL commands.
Answer:

  • Grant – Used to give permission to specific users on specific databases.
  • Revoke – Used to take out permission from specific users on specific databases.

Question 49.
Write the syntax and example for sort the records in SQL.
Answer:
Syntax:
SELECT*FROM tablename ORDER BY columnname ASC/DESC;
Eg: SELECT*FROM studentdb ORDER ‘EY stadName ASC;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 50.
Write the example for subquery in SELECT statement.
Answer:
Eg: SELECT*FROM studentdb WHERE studID
IN (SELECT studID FROM studentdb WHERE class = 12) ;

Question 51.
What is the DBMS mechanism used for data sharing?
Answer:

  • Concurrency control and Locking is the DBMS’s mechanism used for data sharing.
  • When the same data is shared among multiple users, proper access control is needed and privilege of changing the application data item is controlled through locking.

Question 52.
List the types of Attributes.
Answer:

  1. Key Attribute
  2. Simple Attribute
  3. Composite Attribute
  4. Single Valued Attribute
  5. Multi Valued Attribute

Question 53.
Write the attributes of Few entity an example of ER diagram.
Answer:
The attributes of few entity of parent, student and Teacher are
Parent – Name, Id, FName, LName
Student – Id, Name, FName, LName
Teacher – Name, Id, Phone, Address

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 54.
List the some commonly used Databases.
Answer:

  1. DB2
  2. MySQL
  3. Oracle
  4. PostgreSQL
  5. SQLite
  6. SQLServer
  7. Sybase

Question 55.
Write short note on create conceptual Design.
Answer:

  1. Create conceptual Design is the primary in database design, where detailed discussion about the creation of databases, tables, columns and data types is discussed based on the requirement of the application.
  2. As an end result the model is framed to attain the expectation of the application’s end user.
  3. MySQL provides performance dashboard, reports nad statistics regarding the design of database.

Question 56.
Explain the three major parts that create databases.
Answer:
The three major parts that forms a database are Tables, Queries and views.

  1. Tables: It Similar to an excel sheet containing multiple rows and columns.
  2. Queries: It is a question with multiple conditions posted to the database.
  3. Views: A set of stored queries.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 57.
Write the SQL DDL commands.
Answer:
The SQL DDL (Data Definition Language) commands are:

  • CREATE – Used to create database or table.
  • ALTER – Modifies the existing structure of database or table.
  • DROP – Deletes a database or table.
  • RENAME – Used to rename an existing object in the database.
  • TRUNCATE – Used to delete all table records.

Question 58.
Write the SQL DML commands.
Answer:
The SQL DML (Data Manipulation Language) commands are

  • INSERT – Add new rows into database table.
  • UPDATE – Modifies existing data with newdata within a table.
  • DELETE – Deletes the records from the table.

Question 59.
Write the SQL TCL commands.
Answer:
The SQL TCL (Transaction Control Language) commands are

  • COMMIT – Permanent save into database
  • ROLLBACK – Restores database to original form.
  • SET TRANSACTION – Set the transaction properties such as read-write or read only access.
  • SAVE POINT – Used to temporarily save a transaction.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 60.
Write a syntax and example to delete a existing record from the table using delete command with where condition.
Answer:
Syntax:
DELETE FROM tablename WHERE columnname = “Value”;
Eg 1:DELETE FROM’ studentdb WHERE’Rollno = “121008”;
Eg 2:DELETE FROM studentdb;
Eg 1: is to delete a record with rollno 121008 only
Eg 2 :is to delete a table as studentdb

Question 61.
Write the MySQL operators.
Answer:

  • Arithmetic Operators: +, -, *, /, ÷
  • Comparison Operators: =, !=, <, >, < >, >=, <=
  • Logical Operators: AND, ANY, BETWEEN, EXISTS, IN, LIKE, NOT, OR, UNIQUE

Question 62.
What are the rules should follow in sub Queries.
Answer:

  1. Sub Queries are always written within the parantheses.
  2. Always place the subquery on the right side of the comparison operator.
  3. ORDER BY clause is not used in subquery, since subqueries cannot manipulate the results internally.

Question 63.
Write the three database components of network model.
Answer:
The three database components of network model are

  • Network schema: This schema defines all about the structure of the database
  • Sub schema: It controls on views of the database for the user
  • Language: Basic procedure for accessing the database

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 64.
Write the features of RDBMS.
Answer:

  1. High availability
  2. High performance
  3. Robust Transactions and support
  4. Ease of management
  5. Less cost

Question 65.
Explain ER model relationship type.
Answer:
Three types of relationships are available and the Entity-Relationship(ER) diagram is based on the three types listed below.

One-to-One relationship:
Consider two entities A and B. One-to-one (1:1) relationship is said to exist in a relational database design, if 0 or 1 instance of entity A is associated with 0 or 1 instance of entity B, and 0 or 1 instance of entity B is associated with 0 or 1 instance of entity A.

One-to-Many relationship:
Consider two entities A and B. One-to-many (1 :N) relationship is said to exist in a relational database design, for 1 instance of entity A there exists 0 or 1 or many instances of entity B, but for 1 instance of entity B there exists 0 or 1 instance of entity A.

Many-to-Many relationship:
Consider two entities A and B. Many-to- many (M:N) relationship is said to exist in a relational database design, for 1 instance of entity A there exists 0 or 1 or many instances of entity B, and for 1 instance of entity B there exists 0 or 1 or many instance of entity A.

In reality one-to-one are in less usage, where as one-to-many and many-to- many are commonly used. However in relational databases, many-to-many are converted into one-to-many relationships.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 66.
Write the ER diagram Notations.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 1

Question 67.
Write about MySQL.
Answer:

  1. MySQL is a database management system founded by Monty Widenius and named after his daughter name My.
  2. Definition of database and SQL is mandatory to understand MvSOL.
  3. A database is defined as the structured collection of data. Eg: Photo gallery is a database which has collection of photos (data).
  4. SQL – Structured Query Language is not a database. It is a standardized language used to access the database and the data’s are processed to turn into efficient information.
  5. MySQL is open source software that allows managing relational databases.
  6. MySQL also provides the flexibility of changing the source code as per the needs.
  7. MySQL runs on multiple platforms like windows, Linux and is scalable, reliable and fast.
  8. MySQL is the most commonly used database in the world due to its ease of use.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 68.
Draw a ER – diagram by parent, student and teacher.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 2

Question 69.
Explain the newly create user account to MySQL.
Answer:

  1. In MySQL database, there exists a table named user. The newly created account must have an entity in this user table.
  2. The Admin creates an account with username and password.
  3. The user account is activated with various access rights like INSERT, SELECT and UPDATE.
  4. The user table has the following fields host, name, password, select_ priv, insert_priv and update_priv.
  5. A new user account is added with values to the user table using.
    MySQL> INSERT INTO user (host, name, password,
    select_priv, insert_priv, update_priv) VALUES (‘localhost’, ‘guest’, PASSWORD (‘abcl23’), ‘Y’, ‘Y’, ‘Y’);
    then, mysql>FLUSH PRIVILEGES; This command is executed after every new account creation. This command is similar to rebooting the server, so that newly created account and the access privilege are updated in this server.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 70.
How can you install in MySQL in your computer?
Answer:
(i) Download and install XAMPP server software from Internet. Click the welcome page next button.
(ii) Select the required component along with MySQL component and click next button. Choose, the installation folder and click next button.
(iii) Click Next button in setup ready page. Installation get started.
(iv) After Installing click finish button and open the XAMMP control panel.

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 3

(v) In the control panel start the Apache and MySQL services one by one.
(vi) Now open URL http: //local host/PhPMyAdmin URL in a browser to access MySQL database.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 71.
Define Data Model and list the types of data model used.
Answer:

  1. A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to properties of the real world entities.
  2. The types of data model are Hierarchical database model, Network model, Relational model, object – Oriented database model.

Question 72.
List few disadvantages of file processing system.
Answer:

  1. Duplicate data
  2. Inconsistency
  3. Accessing anomalies
  4. Poor data integrity
  5. Poor data security
  6. Atomicity problem
  7. Wastage of labor and space
  8. Data isolation

Question 73.
Define Single and multi valued attributes.
Answer:

  • A single valued attribute contains only one value for the attribute.
    Eg: Age – It is a single value for a person.
  • A multi valued attribute has more than one value for that particular attribute.
    Eg: Degree – A person can hold number of degrees.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 74.
List any two DDL and DML commands with its Syntax.
Answer:
Two DDL (Data Definition Language) commands.
(i) CREATE:
Syntax:
Create database databasename;

(ii) DROP
Syntax:
Drop database database name;

Two DML (Data Manipulation Language) command.
(i) INSERT:
Syntax:
INSERT INTO tablename (columnl, column2, column3)
VALUES (valuel, value2, value3);

(ii) DELETE:
Syntax:
DELETE from tablename WHERE columnname = “value”;

Question 75.
What are the ACID properties?
Answer:
ACID properties are Atomicity, Consistency, Isolation and Durability.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 76.
Which command is used to make permanent changes done by a transaction?
Answer:

  • The SQL commands manage the transactions in SQL databases.
  • It also help to save the change into database permanently.
  • COMMIT, ROLLBACK, SET TRANSACTION and SAVEPOINT commands belongs to this category.

Question 77.
What is view in SQL?
Answer:

  • View in SQL can be described as virtual table which derived its data from one or more than one table columns.
  • It is stored in the database.
  • View can be created using tables of same database or different database.

Question 78.
Write the difference between SQL and MySQL.
Answer:

SQL

 MySQL

SQL – Structured Query Language is not a database. MySQL is open source software that allows managing relational databases.
It is a standardized language used to access the database and the data’s are processed to turn into efficient information. It also provides the flexiblility of changing the source code as per the needs. It runs on multiple platforms like windows, linux and is scalable, reliable and fast.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 79.
What is Relationship and List its types.
Answer:

  1. Relationships are very similar in that they are associations between tables.
  2. There exists a relationship between two tables when the foreign key of one table references primary key of other table.
  3. Its types are one-one-relationship, One-to-many relationship and many- to-many relationship.

Question 80.
State few advantages of Relational databases.
Answer:

  1. High Availability
  2. High Performance
  3. Robust Transactions and Support
  4. Ease of Management
  5. Less Cost

Question 81.
Explain on Evolution of DBMS.
Answer:

  1. Data Base Management System (DBMS) is system software for creating and managing databases.
  2. The concept of storing the data started before 40 years in various formats.
  3. In earlydays they have used punched card technology to store the data. Then files were used. The file systems were known as predecessor of database system.
  4. Various access methods in file system were indexed, random and sequential access.
  5. The file system had more limitations like data duplication, high maintenance and security.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 82.
What is relationship in databases? List its types.
Answer:

  1. Relationships are very similar in that they are associations between tables in database.
  2. There exists a relationship between two tables when the foreign key of one table references primary key of other table.
  3. List of the database types are one-one-relationship, One-to-many relationship and Many-to-many relationship.

Question 83.
Discuss on cardinality in DBMS.
Answer:
Cardinality is defined as the number of items that must be included in a relationship. That is number of entities in one set mapped with the number of entities of another set via relationship. Three caissifications in cardinality are One-to-one, One-to-many and Many-to-many.

Eg 1:

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 4

This cardinality is one-to-one re1atinship between person and vehicle.

Eg 2:

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 5

This cardinality relation is a one-to-many

Eg 3:

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 5

This cardinality relation is a n to n i.e., Many-to-many relationship.
A student can register many courses, A course can be registered by many students.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 84.
List any 5 privileges available in MySQL for the User.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 7

Question 85.
Write few commands used by DBA to control the entire database.
Answer:
The Database Administrator (DBA) frequently uses few commands to control the entire database. Such commands are.
(i) Use Database:
This commands is used to select the database in MySQL for working.
Syntax: Mysql > Use Student;

(ii) Show Databases:
Lists all the databases available in the database server.
Syntax: Mysql > Show databases;

(iii) Show columns from tablename:
List all the attributes, attribute type, IS NULL value permitted, key information for the given table.
Syntax: Mysql > Show columns from Rollnumber;

(iv) Show tables:
List all the tables available in the current database.
Syntax: Mysql > Show tables;

(v) Show index from tablename:
The query shows all the indexes for the given table.
Syntax: Mysql > Show indexes from student;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 86.
Discuss on various database models available in DBMS.
Answer:
The various database models in DBMS are Hierarchical Database Model, Network Model, Relational Model, and Object-oriented database Model.
(i) Hierarchical Database Model:
The Hierarchical database model was IMS (Information Management System), and IBM’s First DBMS.
In this model each record has information in parent/child relationship like a tree structure.

(ii) Network Model:
The first developed network data model was IDS (Integrated Data Store) at Honeywell.
Network model is similar to Hierarchical model except that in this , model each member can have more than one owner. The many to many relationships are handled in a better way.
This model identified the three database components Network schema, Sub schema and language for data management.

(iii) Relational Model:
Oracle and DB2 are few commercial relational model in use.
Relational model is identified with two terminologies Instance and schema.

(iv) Object-Oriented database model:
This model incorporates the combination of object oriented programming (OOP’s) concepts and database technologies.
This Model efficiently manages large number of different data types. Moreover complex behaviours are handled efficiently using OOP’s concepts.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 87.
List the basic concepts of ER Model with suitable example.
Answer:
The basic concepts of ER model consists of
(i) Entity or Entity type
(ii) Attributes
(iii) Relationship

(i) Entity or Entity type:
An Entity can be anything a real-world object or animation which is easily identifiable by anyone even by a common man.
Eg: In a company’s database Employee, HR, Manager are considered as entities, where each of these entity will be having their own attributes. An entity is represented by a rectangular box

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 8

The types of Entity are strong entity, weak entity, and Entity instance.

(ii) Attributes:
An attribute is the information about that entity and it will describe, quantity, qualify, classify, and specify an entity.
Types of attributes:
(a) Key Attribute – Eg: A key
(b) Simple Attribute – Eg: Employee
(c) Composite Attribute – Eg: Name
(d) Single Valued Attribute – Eg: Age
(e) Multi Valued Attribute – Eg: Degree

(iii) Relationship:
Three types of relationships are available, they are One- to-one relationship, One-to-many relationship and Many-to-many relationship.
Three classifications in cardinality are One-to-one, One-to-many and Many-to-many.
Eg: A driver drives a vehicle, this is One-to-one relationship between person and vehicle.
Eg: A customer places the order of many items, this is a One-to-many relationship.
Eg: Courses can be registered by many students, this is a many-to-many relationship.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 88.
Discuss in detail on various types of attributes in DBMS.
Answer:
The various types of attributes in DBMS are:
(i) Key Attribute
(ii) Simple Attribute
(iii) Composite Attribute
(iv) Single valued Attribute
(v) Multivalued Attribute

(i) Key Attribute:
A key attribute describes a unique characteristic of an entity.

(ii) Simple Attribute:
The Simple attributes cannot be separated it will be having a single value for their entity.

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 9

Eg: Here, the name as the attribute for the entity employee and here value for that attribute is a single value.

(iii) Composite Attribute:
The composite attributes can be sub divided into simple attributes without change in the meaning of that attribute.
Eg: In the above diagram, the composite attribute name which are sub¬divided into two simple attributes first and last name.

(iv) Single valued Attributes:
A single valued attribute contains only one value for the attribute and they don’t have multiple numbers of values.

TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System 10

Eg: Age – It is single value for a person.

(v) Multivalued Attributes:
A multi valued attribute has more than one value for that particular attribute.
Eg: Degree – A person can hold number of degrees, so it is multivalued attribute.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 89.
Write a note on open source software tools available in MySQL Administration.
Answer:
Many open source tools are available in the market to design the database in a better and efficient manner.
PhpMy Admin is most popular for web administration.
The popular desktop application tools are MySQL workbench and HeidiSQL.

PHPMYADMIN (Web Admin):
This Administrative tool of MySQL is a web application written in PHP. They are used predominantly in web hosting. The main feature is providing web interface, importing data from CSV and exporting data to various formats.

MySQL workbench (Desktop Application):
This is a database tool used by developers and DBA’s mainly for visualization.
This tool helps in data modeling, development of SQL, server configuration and backup for MySQL in a better way.
The SQL editor of this tool is very flexible and comfortable in dealing multiple results set.

HeidiSQL (Desktop Application):
This is open source tools helps in the administration of better database systems.
It supports GUI (Graphical User Interface) features for monitoring server host, server connection, Databases, Tables, Views, Triggers ami Events.

Question 90.
Explain in detail on Sub Queries with suitable examples.
Answer:
The SQL query is written within a main query. This is called as nested inner/ subquery. The subquery is executed first and the results of sub query are used as the condition for main query.
The sub query must follow the below rules:
(i) Subqueries are always written within the parantheses.
(ii) Always place the subquery on the rightside of the comparison operator. (Hi) Order by clause is not used in subqueiy, since subqueries cannot manipulate the results internally.
Eg: We use subquery in an SELECT statement
SELECT * FROM employee WHERE EMPID IN (SELECT EMPID
FROM employee WHERE salary < 40000);
First, the inner query is executed, then the external or outer query is executed.
similarly the subqueries are used with INSERT, UPDATE and DELETE commands.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Choose the correct answer:

Question 1.
Which systems were known as predecessor of database system?
(a) Management
(b) file
(c) create
(d) update
Answer:
(b) file

Question 2.
What is called, same data is used by multiple resources for processing, thus created multiple copies of same data?
(a) Data Duplication
(b) Maintenance
(c) Security
(d) Management
Answer:
(a) Data Duplication

Question 3.
ACID Stands for:
(a) Atomicity, Consistency, Isolation, Durability
(b) Accessing, Consistency, Isolation, Durability
(c) Atomicity, Concurrency, Isolation, Differently
(d) Accessing, Consistency, Isolation, Differently
Answer:
(a) Atomicity, Consistency, Isolation, Durability

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 4.
When multiple users do the transact! ons by accessing same object at the same time, the transaction is known as:
(a) Atomicity
(b) Consistency
(c) Concurrent
(d) Isolation
Answer:
(c) Concurrent

Question 5.
IMS stands for:
(a) International Machine Service
(b) Information Management System
(c) International Management System
(d) Information Management Service
Answer:
(b) Information Management System

Question 6.
IDS Stands for:
(a) Integrated Data save
(b) International Data store
(c) Integrated Data store
(d) Information Data store
Answer:
(c) Integrated Data store

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 7.
Which schema defines all about the structure of the database?
(a) Network schema
(b) Sub schema
(c) Language
(d) Instance
Answer:
(a) Network schema

Question 8.
Which schema controls on views of the database for the user?
(a) Network schema
(b) Sub schema
(c) Language
(d) Instance
Answer:
(b) Sub schema

Question 9.
Which is basic procedural for accessing the database?
(a) Network schema
(b) Sub schema
(c) Language
(d) Instance
Answer:
(c) Language

Question 10.
What is called a table consisting of rows and columns?
(a) Network schema
(b) Sub schema
(c) Language
(d) Instance
Answer:
(d) Instance

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 11.
Which is specifies the structure including name and type of each column?
(a) Language
(b) Instance
(c) Schema
(d) relation
Answer:
(c) Schema

Question 12.
A relation also known as:
(a) table
(b) columns
(c) rows
(d) files
Answer:
(a) table

Question 13.
A attribute also called as:
(a) table
(b) columns
(c) rows
(d) files
Answer:
(b) columns

Question 14.
A tuples also called as:
(a) table
(b) columns
(c) rows
(d) files
Answer:
(c) rows

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 15.
OOP stands for:
(a) Object Oriented Programming
(b) Oracle Oriented Programming
(c) Objective Oriented Programming
(d) Obstacle Oriented Programming
Answer:
(a) Object Oriented Programming

Question 16.
Which software known as object oriented model uses small and reusable?
(a) Object
(b) Entity
(c) Attributes
(d) Relationship
Answer:
(a) Object

Question 17.
Which is used the most popular relational database?
(a) MSSQL
(b) MySQL
(c) Oracle
(d) MS Access
Answer:
(b) MySQL

Question 18.
Which is defined as the collection of data organized in terms of rows and columns?
(a) Rows
(b) Column
(c) Table
(d) File
Answer:
(c) Table

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 19.
Which is defined in a table to hold values of same type?
(a) Row
(b) Column
(c) Table
(d) Attribute
Answer:
(d) Attribute

Question 20.
The vertical entity in a table is known as attribute or:
(a) Model
(b) Row
(c) Column
(d) compound
Answer:
(c) Column

Question 21.
A single entry in a table is called as row or record or:
(a) Tuple
(b) Model
(c) Compound
(d) Field
Answer:
(a) Tuple

Question 22.
Set of related data’s are represented in a row or:
(a) Column
(b) Tuple
(c) Field
(d) (a) and (b)
Answer:
(b) Tuple

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 23.
The horizontal entity in a table is known as Record or:
(a) Column
(b) Row
(c) Field
(d) (a) and (b)
Answer:
(b) Row

Question 24.
Which type of key is perform the identification task?
(a) Primary key
(b) Super key
(c) Composite key
(d) Compound key
Answer:
(a) Primary key

Question 25.
Every tuple must have, by definition, a unique value for its:
(a) primary key
(b) super key
(c) composition key
(d) compound key
Answer:
(a) primary key

Question 26.
A primary key which is a combination of more than one attribute is called a:
(a) primary key
(b) foreign Key
(c) composite primary key
(d) super key
Answer:
(c) composite primary key

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 27.
A foreign key is a copy of a:
(a) primary key
(b) foreign key
(c) composite primary key
(d) super key
Answer:
(a) primary key

Question 28.
Foreign keys can also be:
(a) zero
(b) null
(c) one
(d) negative
Answer:
(b) null

Question 29.
An attribute or group of attributes, which is sufficient to distinguish every • tuple in the relation from every other one is known as:
(a) primary key
(b) secondary key
(c) super key
(d) foreign key
Answer:
(c) super key

Question 30.
A key with more than one attribute to identify rows in a table is called:
(a) primary key
(b) secondary key
(c) super key
(d) composite key
Answer:
(d) composite key

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 31.
Composite key is also known as:
(a) primary key
(b) super key
(c) composite key
(d) compound key
Answer:
(d) compound key

Question 32.
An _________ can be anything a real-world object or animation.
(a) object
(b) entity
(c) attribute
(d) isolate
Answer:
(b) entity

Question 33.
Which wilt always have a single value, that value can be a number or character or string?
(a) object
(b) entity
(c) attribute
(d) isolate
Answer:
(c) attribute

Question 34.
A person can hold n number of degrees” – Say which type of Attribute?
(a) Key Attribute
(b) Simple Attribute
(c) Composite Attribute
(d) Multi valued Attribute
Answer:
(d) Multi valued Attribute

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 35.
Which is defined as the number of items that must be included in a relationship?
(a) Cardinality
(b) Entity
(c) Key
(b) Simple
Answer:
(a) Cardinality

Question 36.
Which database is founded by Monty Widenius and is named after his daughter name?
(a) MS Access
(b) SQL
(c) MySQL
(d) Oracle
Answer:
(c) MySQL

Question 37.
Which of the following is not a database?
(a) MySQL
(b) SQL
(c) Oracle
(d) Foxpro
Answer:
(b) SQL

Question 38.
Which of the following is open source database software?
(a) MySQL
(b) Oracle
(c) Foxpro
(d) MS Access
Answer:
(a) MySQL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 39.
In the MySQL database, there exists a table named:
(a) key
(b) host
(c) user
(d) password
Answer:
(c) user

Question 40.
Which command is similar to rebooting the server in MySQL?
(a) Flush privileges;
(b) select_priv;
(c) Insert_priv;
(d) Update_priv;
Answer:
(a) Flush privileges;

Question 41.
Which one of the following is most popular for web Administration?
(a) MySQL
(b) Work bench
(c) HeidiSQL
(d) PhPMYAdmin
Answer:
(d) PhPMYAdmin

Question 42.
Which database tool used by developers and DBA’s mainly for visualization?
(a) PhPMYAdmin
(b) MYSQL Workbench
(c) HeidiSQL
(d) MySQL
Answer:
(b) MYSQL Workbench

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 43.
Which is open source tools helps in the administration of better database systems and GUI supports?
(a) PhPMYAdmin
(b) MYSQL Workbench
(c) HeidiSQL
(d) MySQL
Answer:
(c) HeidiSQL

Question 44.
How many major parts are needed that form a database?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(b) 3

Question 45.
Which is a similar to an excel sheet containing multiple rows and columns?
(a) Rows
(b) Records
(c) Fields
(d) Tables
Answer:
(d) Tables

Question 46.
Which is standard Language used for accessing and manipulating databases?
(a) SQL
(b) Foxpro
(c) MS Access
(d) Oracle
Answer:
(a) SQL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 47.
Which SQL command are used to define database schema?
(a) DDL
(b)DML
(c)DQL
(d) DCL
Answer:
(a) DDL

Question 48.
Which SQL command deals with the manipulation of data present in the data base?
(a) DDL
(b) DML
(c) DQL
(d) DCL
Answer:
(b) DML

Question 49.
Which of the following command is data query language?
(a) INSERT
(b) UPDATE
(c) DELETE
(d) SELECT
Answer:
(d) SELECT

Question 50.
Which commands are manage the transactions in SQL databases?
(a) DDL
(b) DML
(c) TCL
(d) DCL
Answer:
(c) TCL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 51.
Which commands are that implement security on database objects?
(a) DDL
(b) DML
(c) TCL
(d) DCL
Answer:
(d) DCL

Question 52.
Which command is used to create new SQL database?
(a) New
(b) Select
(c) Create
(d) Insert
Answer:
(c) Create

Question 53.
Which command is used to remove any of the existing SQL Database?
(a) remove
(b) delete
(c) erase
(d) drop
Answer:
(d) drop

Question 54.
Which command is used to select suitable database for accessing?
(a) Open
(b) Use
(c) Select
(d) New
Answer:
(b) Use

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 55.
Which command is used to add new row to the table?
(a) Add
(b) Update
(c) Insert
(d) New
Answer:
(c) Insert

Question 56.
Which command is used to remove an existing record in a table?
(a) Remove
(b) Delete
(c) Erase
(d) Drop
Answer:
(b) Delete

Question 57.
Which condition is specified to delete entire column data?
(a) INTO
(b) FROM
(c) ORDERBY
(d) WHERE
Answer:
(d) WHERE

Question 58.
Which command is used to modifying and updating the existing record in a table?
(a) Add
(b) Update
(c) Insert
(d) Modify
Answer:
(b) Update

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 59.
Which command is used to sort the record in a table?
(a) WHERE
(b) MODIFY
(c) INTO
(d) ORDER BY
Answer:
(d) ORDER BY

Question 60.
Which clause is used to select data from more than two tables?
(a) FROM
(b) INTO
(c) JOIN
(d) COMBINE
Answer:
(c) JOIN

Question 61.
Sub queries are always written within the:
(a) file
(b) record
(c) field
(d) Parantheses
Answer:
(d) Parantheses

Question 62.
Which clause is not used in sub query?
(a) WHERE
(b) ORDER BY
(c) SELECT
(d) INSERT
Answer:
(b) ORDER BY

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 63.
Match the following:

(A) MySQL (i) DBMS
(B) WINDOWS (ii) Spreadsheet
(C) SQL (iii) RDBMS
(D) MS Excel (iv) OS

(a) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)
(b) (A) – (iii); (B) – (i); (C) – (ii); (D) – (iv)
(c) (A) – (ii); (B) – (iv); (C) – (i); (D) – (iii)
(d) (A) – (ii); (B) – (i); (C) – (iii); (D) – (iv)
Answer:
(a) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)

Question 64.
ODBMS Stands for:
(a) Objective Data Base Management System
(b) Object Data Base Management System
(c) Observe Data Base Management System
(d) Obstacle Data Base Management System
Answer:
(b) Object Data Base Management System

Question 65.
Which is called process of copying table contents into a file for future use? .
(a) Backup
(b) Save
(c) Store
(d) Copy
Answer:
(a) Backup

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 66.
Match the following.

(A) Table (i) Horizontal entity
(B) Column (ii) Single entry
(C) Row (iii) Attribute
(D) Record (iv) Rows and Columns

(a) (A) – (iii); (B) -;(ii); (C) – (i); (D) – (iv)
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(c) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
(d) (A) – (iv); (B) – (ii); (C) – (iii)- (D) – (i)
Answer:
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)

Question 67.
Match the following.

(A) Primary Key (i) Copy
(B) Foreign Key (ii) Unique value
(C) Super Key (iii) Compound Key
(D) Composite Key (iv) Group of Attribute

(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(c) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
(d) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
Answer:
(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Question 68.
Match the following.

(A) Entity Strong (i) Double Rectangular Box
(B) Entity Weak (ii) Rhombus within rhombus
(C) Relationships (iii) Rectangular Box
(D) Between Entities (iv) Rhombus

(a) (A) – (iii); (B) – (ii); (C) – (iv); (D) – (i)
(b) (A) – (ii); (B) – (iv); (C) – (i); (D) – (iii)
(c) (A) – (ii); (B) – (i); (C) – (iii); (D) – (iv)
(d) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
Answer:
(d) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 69.
Match the following:

(A) Attribute (i) Double Ellipse
(B) Key Attribute (ii) Dotted Ellipse inside
(C) Derived Attribute (iii) Underline inside Ellipse
(D) Multivalued Attribute (iv) Ellipse

(a) (A) – (ii); (B) – (iii); (C) – (i); (D) – (iv)
(b) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(d) (A) – (iv); (B) – (i); (C) – (iii); (D) – (ii)
Answer:
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)

Question 70.
Match the following:

(A) PhPMyAdmin (i) Desktop App
(B) HeidiSQL (ii) Server Software
(C) Schema (iii) Web Admin
(D) XAMPP (iv) Structure

(a) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
(b) (A) – (iii); (B) – (ii); (C) – (iv); (D) – (i)
(c) (A) – (ii); (B) – (iv); (C) – (i); (D) – (iii)
(d) (A) – (ii); (B) – (i); (C) – (iii); (D) – (iv)
Answer:
(a) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)

Question 71.

Choose the incorrect pair:
(a) Table – Excel sheet
(b) Queries – Views
(c) MySQL – Desktop App Tool
(d) CSV – Operating system
Answer:
(d) CSV – Operating system

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 72.
Choose the incorrect pair:
(a) Alter -. Modify
(b) Drop – Delete a Table
(c) Truncate – Delete all Table
(d) Delete – Delete a database
Answer:
(d) Delete – Delete a database

Question 73.
Choose the incorrect pair:
(a) INSERT – Add new rows
(b) UPDATE – Rename
(c) SELECT – Retrieve
(d) ROLLBACK – Restore
Answer:
(b) UPDATE – Rename

Question 74.
Choose the incorrect pair:
(a) COMMIT – Permanent Save
(b) ROLLBACK – Restore database
(c) SAVE POINT – Save Temporarily
(d) SETTRANSACTION – Save in Hard disk
Answer:
(d) SETTRANSACTION – Save in Hard disk

Question 75.
Choose the incorrect pair:
(a) JOIN – Update
(b) Grant – Give permission
(c) Revoke – Out permission
(d) Drop – Remove
Answer:
(a) JOIN – Update

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 76.
Choose the correct pair:
(a) WHERE – Query
(b) ORDER BY – Sorting
(c) GROUP BY – File
(d) SELECT – Database
Answer:
(b) ORDER BY – Sorting

Question 77.
Choose the correct pair:
(a) MySQL – Compiler
(b) Oracle – Operating system
(c) MS Access – RDBMS
(d) SQL – Objects
Answer:
(c) MS Access – RDBMS

Question 78.
Choose the correct pair:
(a) Atomicity – Changes
(b) Consistency – thumb rule
(c) Isolation – Concurrent
(d) Durability – Transaction
Answer:
(c) Isolation – Concurrent

Question 79.
Choose the correct pair:
(a) Table – Tuple
(b) Row – Record
(c) Column – Data
(d) Attribute – Row
Answer:
(b) Row – Record

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 80.
Choose the correct pair.
(a) Primary Key – Rows –
(b) Secondary Key – Columns
(c) Foreign Key – Copy of Primary Key
(d) Composite Key – Super Key
Answer:
(c) Foreign Key – Copy of Primary Key

Question 81.
Choose the incorrect statement:
(a) The famous Hierarchical database model was IMS.
(b) Hierarchical database model each record has a tree structure.
(c) The collection of record was called fields.
(d) The individual records are equal to rows.
Answer:
(c) The collection of record was called fields.

Question 82.
Choose the incorrect statement:
(a) The first developed network data model was IDS.
(b) Network model is similar to relational model.
(c) The Network model are handled many to many relationship.
(d) The limitation of network model is difficulty in design and maintenance.
Answer:
(b) Network model is similar to relational model.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 83.
Choose the incorrect statement:
(a) The most popular relational database is Foxpro.
(b) MySQL is an open source database.
(c) MySQL supports different platforms like windows, Linux and MAC operating systems.
(d) The features of RDBMS are high availability and high performance.
Answer:
(a) The most popular relational database is Foxpro.

Question 84.
Choose the correct statement:
(a) A single entry in a table is called as column.
(b) The horizontal entity in a table is known as Record or Row.
(c) Each row is known as Attributes.
(d) The vertical entity in a table is known as Tuple.
Answer:
(b) The horizontal entity in a table is known as Record or Row.

Question 85.
Choose the correct statement:
(a) SQL is a Standard Query Language is a standard language used for accessing and manipulating databases.
(b) The CREATE command is used to draw a Animation. .
(c) DROP command is used to delete the record in a Table.
(d) TRUNCATE command is used to delete a structure of the Table.
Answer:
(a) SQL is a Standard Query Language is a standard language used for accessing and manipulating databases.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 86.
Assertion (A):
A Database Management System (DBMS) is system software for creating and managing databases.
Reason (R):
The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(a) Both A and R are true, and R is the correct explanation for A.

Question 87.
Assertion (A):
The table consists of several files.
Reason (R):
Table can be divide into smaller parts, in terms of column.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(d) A is false, But R is true.

Question 88.
Assertion (A):
A foreign key is a copy of the whole of its parent primary key.
Reason (R):
Foreign key values have to be unique.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(c) A is true, But R is false.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 89.
Assertion (A):
An entity can be anything a real-world object or animation which is easily identifiable.
Reason (R):
Instances are the values for the entity.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(b) Both A and R are true, but R is not the correct explanation for A.

Question 90.
Assertion (A):
COMMIT is SQL TCL commands which is used to restore database to original form.
Reason (R):
ROLLBACK is SQL TCL commands which is used to permanent save.
(a) Both A and R are true.
(b) Both A and R are false.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(b) Both A and R are false.

Question 91.
Pick the odd one out:
(a) SQL
(b) MySQL
(c) Oracle
(d) DBMS
Answer:
(d) DBMS

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 92.
Pick the odd one out:
(a) Windows
(b) MS SQL
(c) Linux
(d) MAC
Answer:
(b) MS SQL

Question 93.
Pick the odd one out:
(a) INSERT
(b) SELECT
(c) DROP
(d) UPDATE
Answer:
(c) DROP

Question 94.
Pick the odd one out:
(a) ALTER
(b) PhPMyAdmin
(c) MySQLworkbench
(d) HeidiSQL
Answer:
(a) ALTER

Question 95.
Pick the odd one out:
(a) DROP
(b) TRUNCATE
(c) DELETE
(d) GRANT
Answer:
(d) GRANT

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 96.
Pick the odd one out:
(a) ,(comma)
(b) ;(semicolon)
(c) :(colon)
(d) .(full stop)
Answer:
(b) ;(semicolon)

Question 97.
Which language is used to request information from a Database?
(a) Relational
(b) Structural
(c) Query
(d) Compiler
Answer:
(c) Query

Question 98.
The diagram gives a logical structure of the database graphically?
(a) Entity-Relationship
(b) Entity
(c) Architectural Representation
(d) Database
Answer:
(a) Entity-Relationship

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 99.
An entity set that does not have enough attributes to form primary key is known as:
(a) Strong entity set
(b) Weak entity set
(c) Identity set
(d) Owner set
Answer:
(b) Weak entity set

Question 100.
Command is used to delete a database.
(a) Delete database databasename
(b) Delete databasename
(c) Drop database database name
(d) Drop database name
Answer:
(d) Drop database name

Question 101.
Which type of below DBMS is MySQL?
(a) Object Oriented
(b) Hierarchical
(c) Relational
(d) Network
Answer:
(c) Relational

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 102.
MySQL is freely available and is open source.
(a) True
(b) False
Answer:
(a) True

Question 103.
represents a “tuple” in a relational database?
(a) Table
(b) Row
(c) Column
(d) Object
Answer:
(b) Row

Question 104.
Communication is established with MySQL using:
(a) SQL
(b) Network calls
(c) Java
(d) API’s
Answer:
(a) SQL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 3 Introduction to Database Management System

Question 105.
Which is the MySQL instance responsible for data processing?
(a) MySQL Client
(b) MySQL Server
(c) SQL
(d) Server Daemon Program
Answer:
(b) MySQL Server

Question 106.
The structure representing the organizational view of entire database is known as …………. in MySQL database.
(a) Schema
(b) View
(c) Instance
(d) Table
Answer:
(a) Schema

TN Board 12th Computer Applications Important Questions

TN Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 1.
Write the command to open a Adobe PageMaker 7.0.
Answer:
Start → All programs → Adobe → PageMaker 7.0 → Adobe Pagemaker 7.0

Question 2.
What are main components of the window?
Answer:
The main components of the window are Title bar, Menu bar, Tool bar, Ruler, Scroll bars and Text area.

Question 3.
What are the menus contains by Menu bar?
Answer:
Menu bar contains the following menus File, Edit, Layout, Type, Element, Utilities, View, Window and Help.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 4.
What is scrolling? Write its types.
Answer:

  • Scrolling is the process of moving up and down or left and right through the document window.
  • There are two scrollbars namely Vertical and Horizontal scroll bars.

Question 5.
What purpose using Enter key at the end of a paragraph?
Answer:
The Enter key should be pressed only at the end of a paragraph or when a blank line is to be inserted.

Question 6.
What is use of UNDO Command?
Answer:

  • The Undo command is used to reverse the action of the last command.
  • To reverse the last command, click on Edit → Undo in the Menu bar or press Ctrl + Z in the keyboard.

Question 7.
Differentiate Copy and Paste command in PageMaker.
Answer:

Copy Paste
In PageMaker, the copy command can be used to copy text from one location in a document. In Pagemaker, the paste command cap be used to paste it as different location in a document.
The copy command creates a duplicate of the selected text, leaving the original text unchanged. The paste command pastes the copied text at the position where the insertion point is placed.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 8.
Differentiate Cut and Paste command using PageMaker.
Answer:

Cut Paste
The cut command is used to selected text easily deleted. The paste command is used for deleted text to be pasted in required location.
The cut command delete the selected text from its original position. The paste command then place this text at the position where the insertion point is located.

Question 9.
What is called window shades?
Answer:

  • When you select a text block with the pointer tool, the block’s boundaries become visible.
  • Two handles are seen above and below the text block. These handles are called window shades.

Question 10.
What is meant by resizing a Text block?
Answer:

  • Two handles are seen above and below the text block.
  • There is a dark square on both ends of the handle. These are used to change the size of the text block.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 11.
Write the difference between threaded text and unthreaded text.
Answer:

Threaded Text Unthreaded Text
A process of connecting text among text blocks is called Threaded Text. Unthreaded Text is where a text block stands alone, without being connected to any other block.
A threaded text block can be identified by a plus sign in its top and / or bottom handles. These blocks have nothing in their top and bottom handles.

Question 12.
How do you separating text from the frame?
Answer:
To separate text from a frame,

  • Click the frame with the pointer tool.
  • Choose Element → frame → Delete content in the menu bar.
    The Text will not appear in the frame.

Question 13.
How can you close a document?
Answer:
After saving, the document can be closed using the file -» close command in the menu bar. (OR)
Ctrl + W shortcut key using from the keyboard.

Question 14.
What are the types of Scroll bar in PageMaker?
Answer:
In PageMaker, there are two sets of scroll bars, one for up and down movement and the other for the left and right movement of the document.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 15.
How can you magnify a part of page by dragging?
Answer:

  • Select the zoom tool.
  • Drag to draw a marque around the area you want to magnify.
    Press Ctrl + Space bar to zoom in, press Ctrl + Alt + Space bar to zoom out.

Question 16.
What is known as formatting a document?
Answer:
Formatting is the process of changing the general arrangement of text, that is improving the appearance of the text by using various fonts, fonts colours, and font styles.

Question 17.
What is a font?
Answer:

  • A font is a set of letters, numbers or symbols in a certain style.
  • Each font looks different from other fonts.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 18.
What is meant by Character formatting?
Answer:

  • Character formatting means displaying text in a certain way.
  • Character formatting consists of text properties – bold, italic, underline, font type, font size, font color etc.,

Question 19.
What is useful for character formatting using the control Palette?
Answer:

  • The control palette is especially useful when you are doing lot of formatting.
  • Its features change based on the object that is selected on your layout.

Question 20.
How can do to modify character attributes using the character control palette?
Answer:

  • Select the text you want to modify.
  • Make the appropriate changes in the control palette.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 21.
What are the main drawing tools in PageMaker?
Answer:

  • There are so many drawing tools in PageMaker.
  • Line tool, Rectangle tool, Ellipse tool and Polygon tool are four main drawing tools.

Question 22.
What are the Drawing Lines in PageMaker?
Answer:

  • PageMaker has two line tools.
  • The first one creates a straight line at any orientation.
  • The second is a constrained line tool that draws only at increments of 45 degrees.

Question 23.
What are the Master pages containing?
Answer:

  • Master pages commonly contain repeating logos, page numbers, headers, and footers.
  • They also contain non printing layout guides, such as column guides, ruler guides, and margin guides.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 24.
How can you to make master items invisible or Hiding?
Answer:
To make the master items invisible on a particular page, switch to the appropriate page, then choose view → Display Master items (which is usually ticked).

Question 25.
How can you showing Master Page Palette?
Answer:
To show Master Page palette.

  • Choose windows → Show Master pages in the menu bar.
  • The master pages palette appears.

Question 26.
What are rulers? How can you show and hide the ruler?
Answer:
There are two rulers bars. One is at the top and the other is at the left side.
To show the ruler:

  1. Click on view. The view menu will appear.
  2. Click on show rulers to show the rulers.

To hide the ruler:

  1. Click on view. The view’ menu will appear.
  2. Click on Hide Rulers to hide the rulers.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 27.
How can you selecting text using the mouse?
Answer:
To select text using a mouse, the steps as follows:

  • Place the insertion point to the left of the character to be selected.
  • Press the left mouse button and drag the mouse to a position where you want to stop selecting.
  • Release the mouse button.
  • The selected text gets highlighted.

Question 28.
How can you selecting text using the keyboard?
Answer:
To select text using keyboard, the steps as follows:

  • Place the insertion point to the left of the first character you wish to select.
  • The Shift key is pressed down and the movement keys are used to highlight the required text.
  • When the Shift key is released, the text is selected.

Question 29.
How can do create a Text block with the text tool?
Answer:
To create a text block with the text tool:

  • Select the- text tool (T) from the toolbox. The pointer turns into an I-beam.
  • On an empty area of the page or pasteboard, click the I-beam where you. want to insert text.
  • Type the text you want.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 30.
How can you to resize a Text block?
Answer:
To resize a text block, the steps as follows:

  • Click on the pointer tool.
  • Click either to left or right comer handle on the bottom of the text block and drag.
  • A red triangle in the bottom window shade means there is more text in the text block than is visible on the page.
  • Drag the window shade handle down to show more text.

Question 31.
How can you splitting a text block into two part?
Answer:
To split a text block into two part, the steps as follows:

  • Place the cursor on the bottom handle, click and drag upwards.
  • When you release the bottom handle will contain a red triangle.
  • Click once on this, and the cursor changes to a loaded text icon.
  • Position this where the second part of the text is to be, and click.

Question 32.
How can you importing text as automatic text flow?
Answer:

  • Before importing the text, first select Layout → Autoflow in the menu bar.
  • Then you should import the text;
  • Now, the loaded text icon looks different, it contains a squiggly narrow TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 1.
  • Place the loaded text icon at the top of the page and click.
  • But how the text will automatically flow on to the succeeding pages.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 33.
What do you understanding story in PageMaker?
Answer:

  • A PageMaker story is similar to a newspaper article.
  • The front page of a newspaper may contain several independent articles, some of which continue on other pages .
  • In PageMaker, several stories may appear on the same publication page and continue elsewhere in the publication.

Question 34.
Write the steps to opening an existing document.
Answer:

  • Choose file → open in the menu bar or click on open icon in the tool bar or press Ctrl + O from keyboard.
  • The filename is given in the file name list box.
  • The name of the file to be opened can be choosen from the list.
  • Now click on the open button, the required file is opened.

Question 35.
What are the procedures should follows scrolling the document?
Answer:
The scrolling procedure is as follows:

  • To scroll left and right, the left and right arrow respectively clicked.
  • To scroll up and down the up and down arrow respectively should be clicked.
  • To scroll a relative distance in the document the scroll box should be drawn up or down.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 36.
What are the steps to make the appropriate changes in the character specifications Dialog Box?
Answer:

  • Click the drop-down menu arrow of the font box and select the desired font.
  • Click the drop-down menu arrow of the font size box and select the font size.
  • Click the drop-down menu arrow of the color box and select the desired colour.
  • Click the Bold, italic, or underline buttons to make the text respectively changed. Then click on OK.

Question 37.
How can you changing the Text Colour?
Answer:

  • Select the text you want to colour.
  • Choose window → Show colors in the menu bar.
  • The colours palette appears, click the color you want to apply to the selected text.
  • The character change to the colour you selected in the palette.

Question 38.
How can you draw a line in PageMaker?
Answer:

  • Select the Line tool from the toolbox. The cursor changes to a cross hair.
  • Click and drag on the screen to draw your line. As you drag, a line appears.
  • Release the mouse button and the line will be drawn and selected, with sizing handles on either end.
  • Resize the line by clicking and dragging the handles, if necessary.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 39.
Drawing a star with given number of sides and required inset.
(i) The value of star inset = 50 %
The number of sides = 15
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 2

(ii) The value of star inset = 25 %
The number of sides = 25
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 3

(iii) The value of star inset = 35 %
The number of sides = 70
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 4

Question 40.
How can you remove the unused pages from your document?
Answer:
Remove the unused pages from your document with a remove pages dialog box.

  • Choose Layout → Remove pages in the menu bar. The remove pages dialog box appears.
  • Type the page range you want to remove.
  • Click on OK button.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 41.
How can you create a new Master page in PageMaker?
Answer:
To create new master page should follow as:

  • Click the New Master page icon in the master pages palette. The New Master page dialog box appears.
  • Enter the name of the new master page in the Name field.
  • Make the appropriate changes in the margins and columns Guides fields.
  • Click on OK.

Question 42.
Draw a work space window and write the parts of the window.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 5

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 43.
Explain Main components of the Workspace window in PageMaker?
Answer:
The main components of the Workspace window are Title bar, Menu bar, Tool bar, Ruler, Scroll bars and Text areas.
(i) Title Bar:
It is topmost part of the window. It shows the name of the software and the name of the document at the left, and the control buttons (minimize, maximize and close) at the right.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 6

(ii) Menu bar:
Menu bar contains File, Edit, Layout, Type, Element, Utilities, View, Window, Help menus. There may be sub-menus under certain options in the pull-down menus.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 7

(iii) Tool Bar:
When you place the mouse pointer on a button in the Tool bar, a short text will appear as its description called Tool Tip.
If the tool box is not available on the screen, click on Window → Show tools, the tool box appears on the screen.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 8

Rulers:
There are two ruler bars one is at the top and the other is at the left side.
Click view → Show Rulers, to show the ruler.
Click view → Hide Rulers, to hide the ruler.

Scroll bars:
There are two scroll bars namely Vertical and Horizontal scroll bars for scrolling the document Vertically or horizontally.

Text areas:
In PageMaker the text of the document can be typed inside a text block. So we must use the text tool to create those text blocks.

After creating a Text block, you can type the text directly into the text block.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 44.
How can you delete a character, or word, or block of text in a document?
Answer:
Delete a character or word:

  • Position the insertion point to the left of the character to be deleted.
  • Then Press Delete key.
  • Position the insertion point to the right of the character to be deleted.
  • Then Press Backspace key.

Delete a block of Text:

  • Select the text to be Deleted.
  • Press Delete or Backspace Key or Edit → Clear from the menu.

Question 45.
How can you move the text in the required location?
Answer:
The cut and paste command is used to move the text in the required location.

  • Select the text to be moved.
  • Choose Edit → Cut in the menu bar or Press Ctrl + X or click right mouse button and choose cut from the Pop-up menu.
  • Insertion point is moved to the place where the text is to be pasted.
  • Choose Edit → Paste in the menu bar, or Press Ctrl + V or click the right mouse button and choose paste from the Pop-up menu.
  • The selected text can be easily cut and pasted in this way.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 46.
How can you copy the text in the required location?
Answer:
The selected text can be easily copied in the required location.

  • Select the text to be copied.
  • Choose Edit → Copy or Press Ctrl + C or click the right mouse button and choose copy from the Pop-up menu.
  • Insertion point is moved to the place where the text is to be pasted.
  • Choose Edit → Paste or Press Ctrl + V or click the right mouse button and choose paste from the Pop-up menu.
  • The text can also be pasted in this way to different location.

Question 47.
How can you placing (Importing) Text from other software program in the PageMaker documents?
Answer:

  • Choose File → Place. The place dialog box will appear.
  • Locate the document that contains the text you want to place and select it.
  • Click on open in the place dialog box. The pointer changes to the loaded text icon. TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 9
  • Make a text block to place the text or click in the page to place the text. The text will be placed in the page.
  • If the text to be placed is too big to fit on one page, PageMaker allows you to place it place it on several pages.
    This can be done manually or automatically.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 48.
Explain different method to unthread a threaded block.
Method 1:

  • Select the block that you wish to unthread with the pointer tool
  • Click on Edit → Cut in the menu bar.
  • Now click on Edit → Paste in the menu bar. The block will reappear in the same position, but it is now an unthreaded block.

Method 2:

  • Select the block that you wish to unthread with the pointer tool.
  • Choose the text tool and select all the text in the block
  • Then click on Edit → Cut in the menu bar. Now click the insertion point within an existing threaded block
  • Click on Edit → Paste in the menu bar. The text will be added in this block.

Question 49.
How can you save, close and open a document in PageMaker?
Answer:
(i) Saving a Document: To save a document for a first time following commands are used.
(a) Choosing File → Save in the Menu bar or save icon in the Tool bar or Press Ctrl + S in the keyboard.
(b) Now save dialog box appear, then select or type filename in the list box, and then click on the save button.
(c) Save as command is used to save a file name in different location. File → Save as or shift + Ctrl + S is used.

(ii) Closing a Document:
After saving the document can be closed using File —» Close or Ctrl + W command is used.

(iii) Opening an existing Document:
Choose File → Open or open icon or Ctrl + O command is used to opening an existing file document.
Now open publication dialog box is opened, the file name is typed or select from the list box, then click on open button. Now the required file is opened.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 50.
Tabulate the different types of movement keys using PageMaker document.
Answer:

Move Press
One character to the left Left Arrow
One character to the right Right Arrow
One word to the left Ctrl + Left Arrow
One word to the right Ctrl + Right Arrow
Up one line Up Arrow
Down one line Down Arrow
To the end of a line End
To the beginning of a line Home
Up one paragraph Ctrl + Up Arrow
Down one paragraph Ctrl + Down Arrow

Question 51.
How can you draw a Dotted line in PageMaker?
Answer:
(i) Double click the Line tool from the tool box. A custom stroke dialog box appears.
(ii) Select the required stroke style in the drop-down list box
(iii) Then Click OK button, Now cursor changes to a cross hair.
(iv) Click and drag on the screen to draw your dotted line. As you drag, the line appears.
(v) Release the mouse button and the line will be drawn and selected, with sizing handles on either end.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 10

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 52.
Write the steps to draw Rectangle or Ellipse.
Answer:
To draw a rectangle or Ellipse.
(i) Click on the Rectangle or Ellipse tool from the tool box. The cursor changes to a cross hair.
(ii) Click and drag anywhere on the screen. As you drag, a rectangle or ellipse appears.
(iii) Release the mouse button when the rectangle or ellipse is of the desired size.
(iv) Press the shift key while you’re drawing to constrain the shape to a square or circle.
(v) Now, required shape of Rectangle and Ellipse are displayed in the document.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 11

Question 53.
Write the steps to draw a Rounded corner Rectangle.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 12

(i) Double-click the Rectangle tool in the tool box. The rounded comers dialog box appears.
(ii) Choose a comer setting from the Dreset shapes.

Method 2:
The Page icons at the left bottom of the screen is move from one page to another page.
Click on the Page icon that corresponds to the page that you want to view. The page is displayed.

Method 3: (Page dialog box):
Choose Layout → Go to Page or Press Alt + Ctrl + G. Now Go to page dialog box appears.
In the dialog box, type the page number that you want to view.
Then click on OK. The required page is displayed on the screen.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 54.
Write the steps to filling Rectangle with colour patterns.
Answer:
(i) Draw a Rectangle using Rectangle tool.
(ii) Select the Rectangle.
(iii) Choose Window → Show color (or) Press Ctrl + J, Now colors palette appears.
(iv) Click on the required colour from the colors palette.
(v) The rectangle has been filled with the colour.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 13

Question 55.
Write the different methods for navigating the pages in your publication.
Answer:
Method 1:
By using the page up and page down keys. This is most probably the navigation methods you will use most often.

Method 2:
The Page icons at the left bottom of the screen is move from one page to another page.
Click on the Page icon that corresponds to the page that you want to view. The page is displayed.

Method 3: (Page dialog box):
Choose Layout → Go to Page or Press Alt + Ctrl + G. Now Go to page dialog box appears.
In the dialog box, type the page number that you want to view.
Then click on OK. The required page is displayed on the screen.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 56.
Write the steps to inserting pages in PageMaker.
Answer:
In PageMaker, insert pages before, after, or between the pages you’re currently viewing.

  • Identify, before the page you want to insert.
  • Choose Layout → Insert pages in the menu bar. The Insert pages dialog box appears.
  • Type the number of pages you want to insert.
  • To insert pages after the current page, choose ‘after’ from the Pop-up menu.
  • Now, click on Insert button.
  • The New pages are inserted in your publication.

Question 57.
Write the steps to print a document in PageMaker?
(i) Choose File → Print or Ctrl + P. The Print Document dialog box appears.
(ii) Select the printer from the printer drop-down list box.
(iii) Choose the pages to be printed in the pages group box by selecting one of the following available options.
All – This option prints the whole document.
Ranges – This option prints individual pages by the page number or a range of pages.
Eg: 1.(5, 7, 20)
2. (1, -20)
3.(5, 7, 10, -25)
Print – Select Odd or Even pages option that will print odd or even number pages.
(i) Type the number of copies you want in the copies text box.
(ii) If the collate option is selected, PageMaker will print a complete set of pages. For example to print pages 1 to 10, then a second set 25 to 50 and so on.
(iii) Finally choosing from the options in the print document dialog box, click print button to print the document.

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 14

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 58.
What is desktop publishing?
Answer:

  1. Desktop Publishing (DTP) is the creation of document using page layout software on a computer.
  2. Desktop Publishing software can generate layouts and produce typographic quality text and images comparable to traditional typography and printing.

Question 59.
Give some example of DTP Software.
Answer:
Some of the popular DTP Software are Adobe Pagemaker, Adobe In Design, Quarkxpress etc.,

Question 60.
Write the steps to open PageMaker.
Answer:
We can open Adobe PageMaker using this command steps.
Start → All Programs → Adobe → PageMaker 7.0 → Adobe PageMaker 7.0

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 61.
How do you create a New document in PageMaker?
Answer:
Step 1: Choose File → New (or) Press Ctrl + N
Step 2: Now document setup dialog box appears, Now enter the appropriate settings for your new document.
Step 3: Click OK button.

Question 62.
What is a Pasteboard in PageMaker?
Answer:

  1. A document page is displayed within a dark border.
  2. The area outside of the dark border is reffered to as the pasteboard.
  3. Anything that is placed completely in the pasteboard is not visible when you print the document.

Question 63.
Write about the Menu bar of PageMaker.
Answer:

  1. Menu bar is one of the main component of work space window in PageMaker.
  2. Menu bar contains File, Edit, Layout, Type, Element, Utilities, View, Window, Help.
  3. There may be sub-menus under certain options in the pull-down menus.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 64.
Differentiate Ellipse tool from Ellipse frame tool.
Answer:

Ellipse tool

 Ellipse frame tool

Used to draw circles and ellipses Used to create elliptical placeholders for text and graphics.
An ellipse tool can be drawn anywhere in the image by defining its points. An ellipse frame tool can be include any item you can add or create in the document window, including Open paths, Closed paths, Compound shapes and paths, type, artwork, 3D objects, and any placed file, such as an image.

Question 65.
What is text editing?
Answer:

  1. Editing means making changes to the text.
  2. Editing encompasses many tasks, such as inserting and deleting words and phrases, correcting errors, and moving and copying text to different places in the document.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 66.
What is text block?
Answer:
A text block contains text you type, paste, or import. All text in PageMaker resides inside containers called Text blocks. A Text block can be connected to other text blocks so that the text in one text block can flow into another text.

Question 67.
What is threading text blocks?
Answer:

  1. The process of connecting text among text blocks is called threading text.
  2. Text that flows through one or more threaded blocks is called story.
  3. A threaded text block can be identified by a plus sign in its top and / or bottom handles.

Question 68.
What is threading text?
Answer:
The process of connecting text among text blocks is called threading text.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 69.
How do you insert a page in PageMaker?
Answer:

  1. We can insert pages before, after or between the pages.
  2. Choose Layout → Insert pages in the menu bar.
  3. Type the number of pages in the dialog box.
  4. Click on Insert.

Question 70.
What is PageMaker? Explain its uses.
Answer:
PageMaker is a page layout software. Page layout software includes tools that allow you to easily position text and graphics on document pages.
Uses:

  • It is used to design and produce documents that can be printed.
  • We can create anything from a simple business card to a large book.
  • We could create a newsletter that includes articles and pictures on each page.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 71.
Mention three tools in PageMaker and write their keyboard shortcuts.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 21

Question 72.
Write the use of any three tools in PageMaker along with symbols.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 22

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 73.
How do you rejoin split blocks?
Answer:
To rejoin the two text blocks that,

  1. Place the cursor on the bottom handle of the second text block, click and drag the bottom handle up to the top.
  2. Then place the cursor on the bottom handle of the first text block, and click and drag the bottom handle down if necessary.

Question 74.
How do you link frames containing text?
Answer:
To link frames containing text that,

  1. Draw a second frame with the frame tool of your choice.
  2. Click the first frame to select it.
  3. Click on the red triangle to load the text icon.
  4. Click the second frame, PageMaker flows the text into the second frame.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 75.
What is the use of Master Page?
Answer:
In master page, Any text or object that you place on the master page will appear on the entire document pages to which the master is applied.

  1. It shortens the amount of time because you don’t have to create the same objects repeatedly on subsequent pages.
  2. Master pages commonly contain repeating logos, page numbers, headers and footers.
  3. Master pages also contain non printing layout guides, such as column guides, ruler guides and margin guides.

Question 76.
How to you insert page numbers in Master pages?
Answer:
To make page numbers appear on every page for inserting page numbers in master pages.

  1. Click on Master pages icon.
  2. Then click on Text tool. Now the cursor changes to I – beam.
  3. Then click on the left master page where you want to put the page number.
  4. Press Ctrl + Alt + P
  5. The page number displays as ‘LM’ on the left master page.
  6. Similarly click on the right master page where you want to put the page number.
  7. Press Ctrl + Alt + P
  8. The Page number displays as ‘RM‘ on the right master page, but will appear correctly on the actual pages.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 77.
Explain the tools in PageMaker toolbox.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 23

TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 24

Question 78.
Write the steps to place the text in a frame.
Answer:
The following steps are to place text in a frame:

  1. Click on one of a frame tool from the Tool box.
  2. Draw a frame with one of PageMaker’s frame tools (Rectangle frame tool or Ellipse frame tool or polygon frame tool). Make sure the object remains selected.
  3. Click on file. The file menu will appear.
  4. Click on place. The place dialog box will appear.
  5. Locate the document that contains the text you want to place, select it.
  6. Click on open.
  7. Click is a frame to place the text in it.
  8. The text will be placed in the frame.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 79.
How can you convert text in a text block to a frame?
Answer:
Converting text in a Text block to a frame, you can do this, by using the following steps:

  1. Draw the frame of your choice using one of the PageMaker’s frame tool.
  2. Select the text block you want to insert in the frame.
  3. Click the frame while pressing the shift key. Now both elements will be selected.
  4. Choose Element → Frame → Attach content on the menu bar.
  5. Now the text appears in the frame.

Question 80.
Write the steps to draw a star using polygon tool?
Answer:
Drawing a star using Polygon tool, you can do this the following steps can be used.

  1. Click on the polygon tool from the tool box. The cursor changes to a cross hair.
  2. lick and drag anywhere on the screen. As you drag, a polygon appears.
  3. Release the mouse button when the polygon is of the desired size.
  4. Choose Element → Polygon settings in the menu bar. Now polygon settings dialogue box appears.
  5. Type 5 in the number of sides text box.
  6. Type 50 % in star inset text box.
  7. Click OK.
    Now the required star appears on the screen.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Choose the correct answer:

Question 1.
Which of the following is called a page layout software?
(a) python
(b) Adobe PageMaker
(c) C++
(d) Oracle
Answer:
(b) Adobe PageMaker

Question 2.
Which of the following is not a DTP software?
(a) MS Powerpoint
(b) Adobe PageMaker
(c) Adobe In Design
(d) Quark X press
Answer:
(a) MS Powerpoint

Question 3.
Which of the following is correct shortcut key to create a new document in • PageMaker?
(a) Ctrl + O
(b) Ctrl + N
(c) Ctrl + R
(d) Ctrl + W
Answer:
(b) Ctrl + N

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 4.
Which is topmost part of the window?
(a) Menu bar
(b) Tool bar
(c) Scroll bar
(d) Title bar
Answer:
(d) Title bar

Question 5.
Which is shows at the right side of the title bar?
(a) File name
(b) Software name
(c) Control buttons
(d) User name
Answer:
(c) Control buttons

Question 6.
Which is shows at the left side of the title bar?
(a) Software name
(b) User name
(c) Control buttons
(d) Both (a) and (b)
Answer:
(d) Both (a) and (b)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 7.
Which short cut key is used to pointer tool in PageMaker?
(a) F9
(b) F7
(c) F5
(d) F2
Answer:
(a) F9

Question 8.
Which is shortcut key used for polygon tool?
(a) Shift + F3
(b) Shift + F4
(c) Shift + F5
(d) Shift + F6
Answer:
(d) Shift + F6

Question 9.
Which shortcut key is used for Text tool?
(a) Shift + Alt + F1
(b) Shift + Alt + F2
(c) Shift + Alt + F3
(d) Shift + Alt + F4
Answer:
(a) Shift + Alt + F1

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 10.
Which tool is used to select, move and resize text objects and graphics?
(a) Pointer tool
(b) Text tool
(c) Line tool
(d) Polygon tool
Answer:
(a) Pointer tool

Question 11.
Which tool is used to trim imported graphics?
(a) Pointer tool
(b) Text tool
(c) Rotating tool
(d) Cropping tool
Answer:
(d) Cropping tool

Question 12.
Which tool is used to scroll the page?
(a) polygon tool
(b) Hand tool
(c) Zoom tool
(d) Ellipse tool
Answer:
(b) Hand tool

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 13.
Which is the moving up and down or left and right through the document window?
(a) Title bar
(b) Menu bar
(c) Tool bar
(d) Scroll bar
Answer:
(d) Scroll bar

Question 14.
Which menu will click appear to show rulers?
(a) View
(b) Edit
(c) File
(d) Tool
Answer:
(a) View

Question 15.
In PageMaker the text of the document can be typed inside a:
(a) Window
(b) Text block
(c) Paragraph
(d) Page
Answer:
(b) Text block

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 16.
As the characters are typed, the flashing vertical bar called:
(a) Editing
(b) Insertion point
(c) Pointer
(d) Rulers
Answer:
(b) Insertion point

Question 17.
Which key should be pressed only at the end of a paragraph?
(a) Ctrl key
(b) Alt key
(c) Enter key
(d) Shift key
Answer:
(c) Enter key

Question 18.
Double-click with I-Beam which text gets selected:
(a) A line
(b) A word
(c) A sentence
(d) A paragraph
Answer:
(b) A word

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 19.
Triple-click with I-beam which text gets selected:
(a) A line
(b) A word
(c) A sentence
(d) A paragraph
Answer:
(d) A paragraph

Question 20.
Which key is pressed down and the movement keys are used to highlight the required text?
(a) Ctrl key
(b) Alt key
(c) Enter key
(d) Shift Key
Answer:
(d) Shift Key

Question 21.
Which key is used, the insertion point to the left of the character to be deleted?
(a) Delete
(b) Backspace
(c) Cut
(d) None of these
Answer:
(a) Delete

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 

Question 22.
Which key is used, the insertion point to the right of the character to be deleted?
(a) Delete
(b) Backspace
(c) Cut
(d) None of these
Answer:
(b) Backspace

Question 23.
Which of the following is used to delete the block of text?
(a) Delete
(b) Backspace
(c) Edit → Clear
(d) All of these
Answer:
(d) All of these

Question 24.
Which command is used to reverse the action of the last command?
(a) Do
(b) Undo
(c) Paste
(d) Copy
Answer:
(b) Undo

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 25.
Which shortcut key is used to reverse the action of the last command?
(a) Ctrl + U
(b) Ctrl + R
(c) Ctrl + Z
(d) Ctrl+ X
Answer:
(c) Ctrl + Z

Question 26.
Which menu can choose to reverse the action of the last command?
(a) Edit → Clear
(b) Edit → UNDO
(c) Edit → Delete
(d) Edit → Reverse
Answer:
(b) Edit → UNDO

Question 27.
Which command can creates a duplicate of the selected text?
(a) Move
(b) Paste
(c) Copy
(d) Cut
Answer:
(c) Copy

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 28.
Which command is used to places the text at the position where the insertion point is placed?
(a) Move
(b) Paste
(c) Copy
(d) Cut
Answer:
(b) Paste

Question 29.
Which of the shortcut key to delete the selected text?
(a) Ctrl + D
(b) Alt + D
(c) Ctrl + X
(d) Ctrl + V
Answer:
(c) Ctrl + X

Question 30.
Which of the shortcut key to be pasted for deleted or copied text?
(a) Ctrl + D
(b) Alt + D
(c) Ctrl + X
(d) Ctrl + V
Answer:
(d) Ctrl + V

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 31.
Choose the menu in the menu bar to delete the selected text:
(a) Edit → Cut
(b) File → Cut
(c) Insert Cut
(d) Tools → Cut
Answer:
(a) Edit → Cut

Question 32.
Choose the menu from the menu bar to paste the text:
(a) Edit → Paste
(b) File → Paste
(c) Insert → Paste
(d) Tools → Paste
Answer:
(a) Edit → Paste

Question 33.
Choose the menu from the menu bar to be copied:
(a) File → Copy
(b) Edit → Copy
(c) Insert → Copy
(d) Tools → Copy
Answer:
(b) Edit → Copy

Question 34.
Which of the shortcut key is used to copy the selected text?
(a) Ctrl + V
(b) Ctrl + O
(c) Ctrl + C
(d) Ctrl + S
Answer:
(c) Ctrl + C

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 35.
Which tool is select from the toolbox, the pointer turns into an I-beam?
(a) Text Tool (T)
(b) Pointer Tool TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 15
(c) Line Tool (\)
(d) Rectangle Tool TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 16
Answer:
(a) Text Tool (T)

Question 36.
Which tool is used to select a text block and become visible?
(a) Text Tool
(b) Pointer Tool
(c) Line Tool
(d) Rectangle Tool
Answer:
(b) Pointer Tool

Question 37.
__________ in the bottom window shade means there is more text in the text block than is visible on the page.
(a) Red triangle
(b) Red rectangle
(c) Red square
(d) Red parallelogram
Answer:
(a) Red triangle

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 38.
A PageMaker story is similar to a article.
(a) Word processor
(b) Spread sheet
(c) Newspaper
(d) Document
Answer:
(c) Newspaper

Question 39.
All text in PageMaker resides inside containers called:
(a) Auto flow
(b) Text blocks
(c) Layout
(d) Threaded
Answer:
(b) Text blocks

Question 40.
The process of connecting text among text blocks is called:
(a) Text blocks
(b) Story
(c) Threading text
(d) Text
Answer:
(c) Threading text

Question 41.
Text that flows through one or more threaded blocks is called a:
(a) Text blocks
(b) Story
(c) Threading text
(d) Text
Answer:
(b) Story

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 42.
Which sign is identified by its top and / or bottom handles a threaded text ‘ block?
(a) plus (+)
(b) minus (-)
(c) slash (/)
(d) back slash (\)
Answer:
(a) plus (+)

Question 43.
Which of the following is not save your document?
(a) Ctrl + S
(b) Ctrl + W
(c) Save icon
(d) File → Save
Answer:
(b) Ctrl + W

Question 44.
Which command is used to save a new file name in a different location?
(a) Save as
(b) Save on
(c) Save in
(d) Save me
Answer:
(a) Save as

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 45.
Which short cut key is used to close the document?
(a) Ctrl + E
(b) Ctrl + C
(c) Ctrl + L
(d) Ctrl + W
Answer:
(d) Ctrl + W

Question 46.
Which shortcut key is used to open the document?
(a) Ctrl + E
(b) Ctrl + C
(c) Ctrl + O
(d) Ctrl + W
Answer:
(c) Ctrl + O

Question 47.
Which key is pressed, to move the insertion point at end of a line?
(a) End
(b) Home
(c) Up arrow
(d) Ctrl + Up arrow
Answer:
(a) End

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 48.
Which key is pressed, to move the insertion point at the beginning the line?
(a) End
(b) Home
(c) Up arrow
(d) Ctrl + Up arrow
Answer:
(b) Home

Question 49.
Which key is used to toggle between magnification and reduction?
(a) Ctrl
(b) Alt
(c) End
(d) Home
Answer:
(a) Ctrl

Question 50.
Which shortcut key is used to zoom in?
(a) Ctrl + S
(b) Ctrl + Space bar
(c) Ctrl + Enter
(d) Ctrl + Insert
Answer:
(b) Ctrl + Space bar

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 51.
Which shortcut key is used to zoom out?
(a) Ctrl + Alt + Space bar
(b) Ctrl + Alt + Enter
(c) Ctrl + Alt + Insert
(d) Ctrl + Alt + Home
Answer:
(a) Ctrl + Alt + Space bar

Question 52.
Which is the process of changing the general arrangement of text?
(a) Magnifying
(b) Zoom in
(c) Zoom out
(d) Formatting
Answer:
(d) Formatting

Question 53.
A is a set of letters, numbers or symbols is a certain style.
(a) Style
(b) Font
(c) Color
(d) Text
Answer:
(b) Font

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 54.
Which shortcut key is used to appear character specifications Dialog Box?
(a) Ctrl + D
(b) Ctrl + B
(c) Ctrl + T
(d) Ctrl + C
Answer:
(c) Ctrl + T

Question 55.
How many types of drawing tools in PageMaker?
(a) 2
(b) 3
(c) 4
(d) many
Answer:
(d) many

Question 56.
How many types of line tools in PageMaker?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(a) 2

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 57.
Which shortcut key is used to appear colour pallette?
(a) Ctrl + C
(b) Ctrl + B
(c) Ctrl + J
(d) Ctrl + R
Answer:
(c) Ctrl + J

Question 58.
Which is main purpose of PageMaker?
(a) Drawing
(b) Composing Pages
(c) Inserting pages
(d) Allignment pages
Answer:
(b) Composing Pages

Question 59.
Which shortcut key is used to go to a specific page in a document?
(a) Alt + Ctrl + G
(b) Alt + Ctrl + P
(c) Alt + Ctrl + V
(d) Alt + Ctrl + B
Answer:
(a) Alt + Ctrl + G’

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 60.
Which shortcut key is used to put the page number on every page?
(a) Ctrl + Alt + N
(b) Ctrl + Alt + P
(c) Ctrl + Alt + M
(d) Ctrl + Alt + K
Answer:
(b) Ctrl + Alt + P

Question 61.
By default, all PageMaker documents have a master page already created:
(a) Text
(b) File
(c) Dialog box
(d) Document master
Answer:
(d) Document master

Question 62.
Which shortcut key is used to print a document?
(a) Ctrl + S
(b) Ctrl + P
(c) Ctrl + O
(d) Ctrl + C
Answer:
(b) Ctrl + P

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 63.
Match the following:

(A) Rotating Tool (i) Shift + F6
(B) Line Tool (ii) Shift + F5
(C) Ellipse Tool (iii) Shift + F3
(D) Polygon Tool (iv) Shift + F2

(a) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(c) (A) – (ii); (B) – (iv); (C) – (i); (D) – (iii)
(d) (A) – (iv); (B) – (ii); (C) – (i); (D) – (iii)
Answer:
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)

Question 64.
Match the following:

(A) Zoom Tool (i) Scroll
(B) Hand Tool (ii) Resize
(C) Ellipse Tool (iii) Magnify
(D) Pointer Tool (iv) Circles

Question 65.(a) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
(b) (A) – (iii); (B) – (ii); (C) – (iv); (D) – (i)
(c) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
(d) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
Answer:
(a) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 66.
Match the following:

(A) View (i) Reverse action
(B) Word (ii) Rulers
(C) Paragraph (iii) Double click
(D) UNDO (iv) Triple click

(a) (A) – (iii); (B) – (ii); (C) – (iv); (D) – (i)
(b) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
(c) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(d) (A) – (ii)- (B) – (i); (C) – (iv); (D) – (iii)
Answer:
(c) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)

Match the following:

(A) Ctrl + Z(i) Close
(B)Ctrl + W(ii)UNDO
(C) Ctrl + Spacebar(iii) Character
(D) Ctrl + T(iv) Zoom in

(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(c) (A) – (iv); (B) – (iii); (C) – (i); (D) – (ii)
(d) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
Answer:
(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Question 67.
Match the following:

(A) Ctrl + A (i) Move beginning of the line
(B) Shift + Home (ii) One line up
(C) Shift + End (iii) Select whole document
(D) Shift + t (iv) Move end of the current line

(a) (A)-(iii); (B)-(ii); (C)-(ii); (D)-(i)
(b) (A)-(iii); (B)-(i): (C)-(iv); (D)-(ii)
(c) (A)-(ii); (B)-(iii); (C)-(iv): (D)-(i)
(d) (A)-(ii); (B)-(i); (C)-(iv); (D)-(iii)
Answer:
(b) (A)-(iii); (B)-(i): (C)-(iv); (D)-(ii)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 68.
Choose the incorrect pair:
(a) Ctrl + N – New file
(b) Ctrl + 0 – open file
(c) Shift + F3 – Rectangle Tool
(d) F9 – Pointer Tool
Answer:
(c) Shift + F3 – Rectangle Tool

Question 69.
Choose the incorrect pair:
(a) Text Tool – TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 17
(b) Pointer Tool – TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 18
(c) Line Tool – TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 19
(d) Rectangle Tool – TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 20
Answer:
(c) Line Tool – TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker 19

Question 70.
Choose the incorrect pair:
(a) View – Show Rulers
(b) Enter key – blank line
(c) Del key – Right of the character
(d) Vertical bar – Insertion bar
Answer:
(c) Del key – Right of the character

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 71.
Choose the correct pair:
(a) File – Copy
(b) File – Paste
(c) File – Cut
(d) File – New
Answer:
(d) File – New

Question 72.
Choose the correct pair:
(a) Ctrl + Left arrow – one word right
(b) Ctrl + Right Arrow – one word left
(c) Home – beginning of a paragraph
(d) End – end of the line
Answer:
(d) End – end of the line

Question 73.
Choose the incorrect statement:
(a) Title bar is the topmost part of the window.
(b) Maximise button is used for maximising the current document window.
(c) Close button closes the software itself.
(d) Pointer tool is used to select and edit text
Answer:
(d) Pointer tool is used to select and edit text

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 74.
Choose the incorrect statement:
(a) Scrolling is the process of moving up and down.
(b) The Enter key must be pressed at the end of its each line in text block.
(c) Editing means making changes to the text.
(d) Text can be selected using mouse or the keyboard
Answer:
(b) The Enter key must be pressed at the end of its each line in text block.

Question 75.
Choose the incorrect statement:
(a) Press Ctrl + A to select the entire document.
(b) Ctrl + Z is used to reverse the action of the last command.
(c) Backspace key is used to delete the left of the character.
(d) Edit → Clear command is used to delete a block of text.
Answer:
(c) Backspace key is used to delete the left of the character.

Question 76.
Choose the correct statement:
(a) The selected text can be easily copied and pasted in the required location.
(b) Ctrl + C keys used to center the text in a document.
(c) A red triangle in the bottom window shade means there is end text in the text block.
(d) A PageMaker story is similar to a word processor software
Answer:
(a) The selected text can be easily copied and pasted in the required location.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 77.
Choose the correct statement:
(a) In PageMaker, there are four sets of scroll bars.
(b) PageMaker’s scroll bars work differently than those in a word processor.
(c) Use the scroll bar on the right side to move left and right.
(d) Use the scroll bar at the bottom to move up and down.
Answer:
(b) PageMaker’s scroll bars work differently than those in a word processor.

Question 78.
Pick the odd one out:
(a) SAP
(b) Adobe PageMaker
(c) Adobe in Design
(d) QuarkXpress
Answer:
(a) SAP

Question 79.
Pick the odd one out:
(a) Title bar
(b) Line Tool
(d) Tool bar
(c) Menu bar
Answer:
(b) Line Tool

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 80.
Pick the odd one out:
(a) File
(b) Edit
(c) Type
(d) Window
Answer:
(d) Window

Question 81.
Pick the odd one out:
(a) Ctrl + X
(b) Ctrl + Z
(c) Ctrl + C
(d) Ctrl + V
Answer:
(b) Ctrl + Z

Question 82.
Pick the odd one out:
(a) Line Tool
(b) Rotating Tool
(c) Text Tool
(d) Text block
Answer:
(d) Text block

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 83.
Assertion (A):
Adobe PageMaker is a page layout software.
Reason (R):
Page layout software includes tools that allow you to easily position text and graphics on document pages.
(a) Both A and R are true, and R is the correct explanation for A
(b) Both A and R are true, But R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is True.
Answer:
(a) Both A and R are true, and R is the correct explanation for A

Question 84.
Assertion (A):
A document page is displayed outside of the dark border.
Reason (R):
The area outside of the dark border is reffered to as the paste board.
(a) Both A and R are true, and R is the correct explanation for A . (b) Both A and R are true, But R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is True.
Answer:
(d) A is false, But R is True.

Question 85.
Assertion (A):
PageMaker will automatically wrap the text to the next line.
Reason (R):
The Enter key must be pressed at the end of the each line in text block.
(a) Both A and R are true, and R is the correct explanation for A
(b) Both A and R are true, But R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is True.
Answer:
(c) A is true, But R is false.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 86.
Assertion (A):
When press Delete key, the position the insertion point to the right of the character to be deleted.
Reason (R):
When press Backspace key, the position the insertion point to the left of the character to be deleted.
(a) Both A and R are true, and R is the correct explanation for A
(b) Both A and R are false.
(c) A is true, But R is false.
(d) A is false, But R is True.
Answer:
(b) Both A and R are false.

Question 87.
Assertion (A):
Use the zoom tool to magnify or reduce the display of any area in your publication.
Reason (R):
Formatting is the process of changing the general arrangement of text.
(a) Both A and R are true, and R is the correct explanation for A
(b) Both A and R are true, But R is the not correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is True.
Answer:
(b) Both A and R are true, But R is the not correct explanation for A.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 88.
DTP stands for:
(a) Desktop Publishing
(b) Desktop Publication
(c) Doctor To Patient
(d) Desktop Printer
Answer:
(a) Desktop Publishing

Question 89.
________ is a DTP software.
(a) Lotus 1-2-3
(b) PageMaker
(c) Maya
(d) Flash
Answer:
(b) PageMaker

Question 90.
Which menu contains the New option?
(a) File menu
(b) Edit menu
(c) Layout menu
(d) Type menu
Answer:
(a) File menu

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 91.
In PageMaker Window, the area outside of the dark border is referred to as:
(a) page
(b) pasteboard
(c) blackboard
(d) dashboard
Answer:
(b) pasteboard

Question 92.
Shortcut to close a document in PageMaker is:
(a) Ctrl + A
(b) Ctrl + B
(c) Ctrl + C
(d) Ctrl + W
Answer:
(d) Ctrl + W

Question 93.
A tool is used for magnifying the particular portion of the area.
(a) Text tool
(b) Line tool
(c) Zoom tool
(d) Hand tool
Answer:
(c) Zoom tool

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 94.
_________ tool is used for drawing boxes.
(a) Line
(b) Ellipse
(c) Rectangle
(d) Text
Answer:
(c) Rectangle

Question 95.
Place option is present in menu.
(a) File
(b) Edit
(c) Layout
(d) Window
Answer:
(a) File

Question 96.
To select an entire document using the keyboard, press:
(a) Ctrl + A
(b) Ctrl + B
(c) Ctrl + C
(d) Ctrl + D
Answer:
(a) Ctrl + A

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 97.
Character formatting consists of which of the following text properties?
(a) Bold
(b) Italic
(c) Underline
(d) All of these
Answer:
(d) All of these

Question 98.
Which tool lets you edit text?
(a) Text tool
(b) Type tool
(c) Crop tool
(d) Hand tool
Answer:
(a) Text tool

Question 99.
Shortcut to print a document in Pagemaker is:
(a) Ctrl + A
(b) Ctrl + P
(c) Ctrl + C
(d) Ctrl + V
Answer:
(b) Ctrl + P

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 100.
Adobe PageMaker is a __________ software.
Answer:
DTP

Question 101.
__________ Bar is the topmost part of the PageMaker window.
Answer:
TITLE

Question 102.
________ is the process of moving up and down or left and right through the document window.
Answer:
Scrolling the document

Question 103.
__________ tool is used to draw a circle.
Answer:
Ellipse

Question 104.
The Insert pages option is available on clicking the _________ menu.
Answer:
Layout

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 105.
Match the following:

(A) Cut (i) Ctrl + Z
(B) Copy (ii) Ctrl + V
(C) Paste (iii) Ctrl + X
(d) Undo (iv) Ctrl + C

(a) (A) – (ii); (B) – (iv); (C) – (ii); (D) – (i)
(b) (A) – (iii); (B) – (iv); (C) – (ii); (D) – (i)
(c) (A) – (i); (B) – (iv); (C) – (iii); (D) – (i)
(d) (A) – (iv); (B) – (iv); (C) – (ii); (D) – (i)
Answer:
(b) (A) – (iii); (B) – (iv); (C) – (ii); (D) – (i)

Question 106.
Choose the odd man out:
(i) Adobe PageMaker, QuarkXPress, Adobe InDesign, Audacity
(ii) File, Edit, Layout, Type, Zip
(iii) Pointer Tool, Line tool, Hide Tool,Hand Tool
(iv) Bold, Italic, Portrait, Underline
Answer:
(i) Adobe PageMaker, QuarkXPress, Adobe InDesign, Audacity

Question 107.
Choose the correct statement:

(i)
(a) Text can be selected using mouse only.
(b) Text can be selected using mouse or the keyboard.
Answer:
(a) Text can be selected using mouse only.

(ii)
(a) DTP is an abbreviation for Desktop publishing.
(b) DTP is an abbreviation for Desktop publication.
Answer:
(a) DTP is an abbreviation for Desktop publishing.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 2 An Introduction to Adobe Pagemaker

Question 108.
Choose the correct pair:
(a) Edit and Cut
(b) Edit and New
(c) Undo and Copy
(d) Undo and Redo
Answer:
(a) Edit and Cut

TN Board 12th Computer Applications Important Questions

TN Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 1.
Write the famous quote said by founder of Microsoft, Billgates on Business and entertainment industry.
Answer:
“If your business establishment is not on the internet (online based), then your business will be out of business context”.

Question 2.
What are client server architecture model?
Answer:

  • Single Tier Architecture
  • Two Tier Architecture
  • Multi/Three Tier Architecture.

Question 3.
What is the use of single Tier Architecture?
Answer:

  • The single tier Architecture is used for the server, accessed by client.
  • The client application runs inside the server machine itself.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 4.
What is the use of the Two Tier Architecture?
Answer:

  • The two Tier Architecture is used for the server, accessed by client as two layers interactions.
  • Such as client layer in tire one and server layer in tire two.

Question 5.
What is the use of multi Three Tier Architecture?
Answer:

  • The use of multi/Three Tier Architecture is used for the server, accessed by client through more than one layer interaction.
  • The programmer could decide the count of business logic layers according to the software requirement.

Question 6.
What are the types of web scripting language?
Answer:

  • Web scripting languages are classified into two types, client side and server side scripting language.
  • PHP is completely different from client side scripting language like java script.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 7.
What is web development concept?
Answer:
Web development concept describes in detail about website development and hosting through network (Internet/ Intranet).

Question 8.
What are includes the process of development?
Answer:
The process of development includes web content generation, web page designing, website security and so on.

Question 9.
What are the PHP syntax?
Answer:
Three types of PHP syntax are available they are

  • Default syntax,
  • Short open tags,
  • HTML script embed tags.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 10.
What are default syntax?
Answer:
The default syntax begins with “<?php” and closes with “?>”.

Question 11.
What are short open tags?
Answer:
The short open tags begin with “<?” and closes with “?>”. But Admin user has to enable short style tags settings in php. ini file on the server.

Question 12.
Write the syntax for HTML script embed tags?
Answer:
Syntax:
<script language = “php”> echo “This is HTML script tags”;
</script>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 13.
What is variables?
Answer:
Variables are the storage location, which can store the values for the later manipulations in the program.

Question 14.
What is the main advantage of the PHP variable declaration?
Answer:
The main advantage of the PHP variable declaration is, it does not requires to specify the data type keyword separately such as int, char, float, double or string etc.,

Question 15.
What is var_dump() system?
Answer:
The var_dump() system define function, returns structured information (type and value) about variable in PHP.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 16.
What is an Array?
Answer:
An Array is a data type which has multiple values in single variable.
Eg: $Marks = array (“89”, “99”, “86”, “78”);

Question 17.
What is PHP an object?
Answer:
PHP object is a data type which contains information about data and function . inside the class.

Question 18.
What is NULL?
Answer:
NULL is a special data type which contains a single value NULL.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 19.
What is string in PHP?
Answer:
String is a collection of characters within the double or single quotes.
Eg: $x = “computer”; ‘
$y = ‘computer’;

Question 20.
What is a Resource?
Answer:

  • Resource is a specific variable, it has a reference to an external resource.
  • These variables hold specific handlers to handle files and database connections in respective PHP program.

Question 21.
What is assignment operator in PHP?
Answer:

  • The default assignment operator is “=”.
  • Assignment operators are performed with numeric values to store a value to a variable.
  • This = operator sets the left side operant value of expression to right side variable.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 22.
What are the use to perform Increment and Decrement operators?
Answer:

  • Increment and Decrement operators are used to perform the task of increasing or decreasing variables value.
  • This operator is mostly used during iterations in the program logics.

Question 23.
What are string operators?
Answer:
Two operators are used to perform string related operations such as concatenation and concatenation assignment.
. – concatenation operator
.= – concatenation assignment operator.

Question 24.
What is URL?
Answer:
URL means uniform resource locator, the address of a specific web page or file on the internet.

Question 25.
What is HTTP?
Answer:
HTTP means Hyper Text Transfer Protocol is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions web servers and browsers should take in response to various commands.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 26.
What will be the output of the following PHP code?
1. <?php
2. $one = 1;
3. print(Sone);
4. print $one; .
5. ?>
Output: 11 * (print can be used in PHP with or without parantheses)

Question 27.
What will be the output of the following PHP code?
Answer:
1. <?php
2. Scars = array (“volvo”, “BMW” “TOYOTO”)
3. Print $cars[2];
4. ?>
Output: Toyoto

Question 28.
What will be the output of the following PHP code?
Answer:
1. <?php
2. for ($i = 0; $i<5; $i++)
M
4. for($j = $i; $j>0; $i—)
5. print $i; –
8.}
7. ?>
Output: infinite loop, (No output)

Question 29.
What will be the output of the PHP code?
Answer:
$x = 5;
echo $x; echo “<br/>”;
echo $x+++$x++;
Output: 5
11

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 30.
What is output?
Answer:
var_dump (0123 = = 123);
var_dump (‘0123’ = = 123);
var_dump (‘0123 = = = 123);
Output: false
true
false

Question 31.
What are basic rules for variable decoration in PHP?
Answer:

  • Variable name must always begin with $ symbol.
  • Variable name can never with a number.
  • Variable name are case-sensitive.

Question 32.
List the PHP supports data types.
Answer:
PHP supports data types are

  1. String
  2. Integer
  3. Float
  4. Boolean
  5. Array
  6. Object
  7. NULL
  8. Resource

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 33.
What is use var_dump() function in PHP?
Answer:

  • The var_dump() function is used to dump information about a variable.
  • This function displays structured information such as type and value of the given variable.
  • Arrays and objects are explored recursively with values indented to show structure.

Question 34.
List the operators in PHP.
Answer:
The operators in PHP are

  1. Arithmetic operators
  2. Assignment operators
  3. Comparison operators .
  4. Increment/Decrement operators
  5. Logic operators
  6. String operators

Question 35.
Write the Arithmetic Operators and its purposes.
Answer:

  1. + – Addition, It performs the process of adding numbers.
  2. – – Subtraction, It performs the process of subtracting numbers.
  3. * – Multiplication, It performs the process of multiplying numbers.
  4. / – Division, It performs the process of dividing numbers.
  5. % – Modules, It performs of finding remainder in division.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 36.
Write the assignment operators and its description.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor 1

TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor 2

Question 37.
Write the Increment and Decrement operators.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor 3

Question 38.
Write the logical operators with example.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor 4

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 39.
What will be the output of the following PHP code?
Answer:
<?php
$x = 10;
$y = 20;
if ($x > $y + $y I = 3)
Print “Hello sir”; else
Print “How are you”;
?>
Output: Hello sir

Question 40.
What will be the output of the following PHP code?
Answer:
<?php
echo 5*9 / 3+9;
?>
Output: 24

Question 41.
What will be the output of the following PHP code?
Answer:
<?php
$a = 1; $b = 3;
$d = $a++ + ++$b;
echo $d; 1
?>
Output: 5

Question 42.
What will be the output of the following PHP code?
Answer:
<?php
$a = 10; $b = 10; if ($a = 5)
$b—;
Print $a; Print $b —;
?>
Output: 59

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 43.
What will be the output of the following PHP code?
Answer:
<?php
$b = 1; $c = 4; $a = 5;
$d = $b + $c = = $a;
Print $d;
?>
Output: 1

Question 44.
What is PHP $ and $$ variable?
Answer:

  • The $ variable is a normal variable with the name var that stores any value like string, integer, float etc.,
  • The $$ variable is a reference variable that stores the value of the $ variable inside it.

Question 45.
How many types of array are there in PHP?
Answer:
There are three types of array in PHP

  • Indexed array
  • Associative array
  • Multidimensional array.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 46.
How is PHP script work?
Answer:

  1. Website or web page is developed by the programmer using PHP script.
  2. Next the entire website codes are moved to web server path in a remote server machine.
  3. From client side, the end user opens a browser, types the URL of the website or webpage and initiates the request to remote server machine over the network.
  4. After receiving the request from client machine the web server tries to compile and interpret the PHP code which is available in remote machine.
  5. Next a response will be generated and sent back to the client machine over the network from web server.
  6. Finally the browser which is installed in the client machine receives the response and displays the output to user.

Question 47.
Write the comparison operators.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor 5

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 48.
What are the advantages, you should use PHP program language?
Answer:

  1. PHP is an open source software
  2. PHP is a case sensitive language
  3. PHP is a simplicity program language
  4.  PHP is a Efficiency program language
  5. PHP is a Platform Independent program language
  6. PHP is a Flexibility program language
  7.  PHP is a Real-Time access monitoring program language.\

Question 49.
Write a PHP program to print the table of 7.
Answer:
<?php
define (‘a’/7);
Output: 7
14
21
28
35
42
49
56
63
70

Question 50.
Write a PHP program to find factorial number, (for example to find 4).
Answer:
<?php
$num = 4
Sfactorial = 1;
for ($x = $num; $x> = 1; $x –)
{
$factorial = $factorial*$x;
}
echo “Factorial of $num is $factoriai”;
?>
Output: Factorial of 4 is 24.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 50.
What are the common usages of PHP?
Answer:

  1. The common usages of PHP scripts can be used on most of the well- known operating systems like Linux, Unix, Solaris, Microsoft windows, MAC OS and many others.
  2. It also supports most web servers including Apache and IIS.

Question 51.
What is Webserver?
Answer:

  1. A Webserver is server software, or hardware dedicated to running said software, that can satisfy World Wide Web client requests.
  2. A web server can, in general, contain one or more websites.

Question 52.
What are the types scripting language?
Answer:
The types of scripting language are Perl, Javascript, VB script, Apple script, Microsoft ASP, JSP, PHP, Python etc.,

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 53.
Difference between Client and Server.
Answer:

Client

 Server

The client is a separate hardware machine which is connected with server in the network. The server is a high performance hardware machine it could run more than one application concurrently.
It could send the request and receive the response from the server hardware. Server that the action takes place on a web server.

Question 54.
Give few examples of Web Browser.
Answer:
Web Browsers are Internet Explorer, Mozilla Firefox, Google chrome, Safari, Opera, Konqueror, Lynx etc.,

Question 55.
What is URL?
Answer:

  1. A URL (Uniform Resource Locator), is a reference to a web resource that specifies its location on a computer network and mechanism for retrieving it.
  2. The address of a World Wide Web page.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 56.
Is PHP a case sensitive language?
Answer:
Yes, PHP is a case sensitive language.

Question 57.
How to declare variables in PHP?
Answer:
The variable in PHP begins with a dollar ($) symbol and the assignment activity implemented using “=” operator, finally the statement ends with semicolon The semicolon indicates the end of statement.

Question 58.
Define Client Server Architecture.
Answer:

  1. Client server architecture is a computing model in which the server hosts, delivers and manages most of the resources and services to be consumed by the client.
  2. This type of architecture has one or more client computers connected to a central server over a network or internet connection.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 59.
Define Webserver.
Answer:

  1. A Webserver is server software, or hardware dedicated to running said software, that can satisfy World Wide Web client requests.
  2. A web server can, in general, contain one or more websites.

Question 60.
Write the features of server side scripting language.
Answer:

  1. Server side scripting language is a technique use in web development which involves employing scripts on a web server which produce a response customized for each users request to the website.
  2. Server side scripting is often used to provide a customized interface for the user.
  3. Serverside scripting also enables the website owner to hide the source code that generates the interface.
  4. Scripts can be written in any of a number of server-side scripting languages that are available in the following.
  5. ASP, Active VFP, ASP.NET, Cold Fusion Markup language, GO, Google Apps script, Hack, Haskell, Java Server Page, Java Script, Lasso, Lua, Parser, Perl, PHP, Python, R, Ruby, SMX, TCL, WebDNA, Progress web speed, Bigwig etc.,

Question 61.
Write is the purpose of Web server.
Answer:

  1. A web server is a server software, or hardware dedicated to running said software, that can satisfy World Wide Web client requests.
  2. A web server processes incoming network requests over HTTP and several other related protocols.
  3. The primary function of a Webserver is to store, process arid deliver web pages to clients.
  4. Multiple web server may be used for high traffic website.
  5. The primary function of Webserver is to serve content, a full implementation of HTTP also includes ways of receiving content from clients.
  6. Many generic web servers also support server-side scripting using active server pages or other scripting languages.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 62.
Differentiate Server side and Client Side Scripting language.
Answer:

Server side

 Client side

The server side that runs a scripting language is a web server. The Client side used to run scripts is usually a browser.
A user’s request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. The source code is transfered from the web server to the users computer over the internet and run directly in the browser.
This HTML is then sent to the client browser. The processing takes place on the end users computer.
It is usually used to provide interactive web sites that interface to databases or other data stores on the server. The scripting language needs to be enable on the client computer.

Question 63.
In how many ways you can embed PHP code in an HTML page?
Answer:

  1. There are two ways to use can embed PHP code in an HTML page.
  2. The first way is to put the HTML outside of your PHP tags. You can even nut it ip the middle if you close and reopen the tags.
  3. The second way to use HTML with PHP is by using PRINT or ECHO. By using this method you can include the HTML inside of the PHP tags. This is a nice quick method if you only have a line or so to do.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 64.
Write short notes on PHP operator.
Answer:
Operator is a symbol which is used to perform mathematical and logical operations in the programming languages.
Different types of operator in PHP are –

  1. Arithmetic operators
  2. Assignment operators
  3. Comparison operators
  4.  Increment/Decrement operators
  5. Logical operators and
  6. String operators.

Question 65.
Explain client side and server side scripting language.
Answer:
All websites usually run on three components namely the server, the client and the database. To view a website, an individual has to use a browser. The browser can be termed as a client.
The client can use different technologies like mobile phones, laptops, computers, tablets, etc., to view the websites.
The server can run back-end architecture of a website, process requests, send pages to the browser, and so on. Server side scripting is usually done by a web server.

Client side scripting:

  1. Client scripting can be defined as a code that is present in a client’s HTML page.
  2.  It is usually attached to the browser in a language that is compatible with the browser.
  3. The language used for client scripting is Java script, VB script etc., It is the most widely used language for client-side scripting.
  4. Today, client-side scripting is rapidly growing and volving.

Server side scripting:

  1. The server side scripting usually happens on the back-end of a website.
  2. The user does not get access to view, A server side scripting creates a path for the website to the database and all the behind-the scene work.
  3. The commonly used in server scripting are Ruby, PHP, ASP etc.,
  4. Most of the websites today uses both client-side and server-side scripting. Popular sites like Amazon, Google, Facebook etc., make use of both client and server side scripting.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 66.
Discuss in detail about Website development activities.
Answer:
There are numerous steps in the website development activities, some basic Activities are –

  1. Information gathering,
  2. Planning,
  3. Design,
  4. Development,
  5. Testing and Delivery,
  6. Maintenance.

(i) Information Gathering:
It is important that your web designer start off by asking a lot of information from the company and needs in a website. Important information gathering are purpose, goals, Target Audience and content.

(ii) Planning:
During the planning phase, your web designer will also help you decide what technologies should be implemented and discuss any planning your website.

(iii) Design:
As part of the design phase, it is also incorporate elements such as the company logo or colours to help strengthen your company website. The most important to express you likes and dislikes on the side design.

(iv) Development:
(a) The first develop is home page, and followed by a shell for the interior page.
(b) On the technical front, a successful website requires an understanding of front end web development.

(v) Testing and Delivery:
(a) As part of testing, your designer should check to be sure that all of the code written for your website validates. This is helpful when checking for issues such as cross-browser compatibility.
(b) Finally include plugin installation, and web designer final approval, it is time to deliver the site.

(iii) Float:
Float datatypes contains decimal numbers. Eg: $m = 15.25;

(iv) Boolean:
Boolean is a data type which denotes the possible two states, true or false. Eg: $x = true; $y = false;

(v) Array:
Array is data type which has multiple values in single variable. Eg: Subjects = array (“Tamil”, “English”, “Computer Application”);

(vi) Object:
PHP object is a data type which contains information about data function inside the class.

(vii) NULL:
Null is a special data type which contains a single value NULL. Eg: $x = null;

(viii) Resource:
(a) Resource is a specific variable, it has a reference to an external resource.
(b) These variables hold specific handlers to handle files and database connections in respective PHP program.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 67.
Explain the process of Webserver installation.
Answer:
Web server software is available as open source or licensed version in the market.
The open source web servers such as Tomcat Apache, Nginx etc.,
The following are the steps to install and configure Apache Httpd web server and PHP Module in windows server machine.

Step 1 : http://httpd.appache.org/download.cgi download the Httpd Webserver software.

Step 2: User launches the MSI file and clicks next and next button to finish the installation on server machine.

Step 3: To test the installation, use the URL https ://localhost: 130/ (or) https://localhost:130130 Now, screen that display “Its works”

Step 4: Administrator user can start, stop and restart the web server service at any time via windows control panel.

Step 5: Webservers configuration setting file “httpd.conf ” is located in the conf directory. Edit this file and enable the PHP module to run PHP scripting language.

Question 68.
Discuss in detail about PHP data types.
Answer:
PHP scripting language supports 13 primitive data types. PHP supports the following important data types,

  1. String,
  2. Integer,
  3. Float,
  4. Boolean,
  5. Array,
  6. Object,
  7. NULL,
  8. Resource.

(i) String:
String is a collection of characters within the double or single quotes. Eg: $m = “Rajesh”;

(ii) Integer:
Integer datatype contains non decimal number.
Eg: $m = “2675”;

(iii) Float:
Float datatypes contains decimal numbers. Eg: $m = 15.25;

(iv) Boolean:
Boolean is a data type which denotes the possible two states, true or false. Eg: $x = true; $y = false;

(v) Array:
Array is data type which has multiple values in single variable. Eg: Subjects = array (“Tamil”, “English”, “Computer Application”);

(vi) Object:
PHP object is a data type which contains information about data function inside the class.

(vii) NULL:
Null is a special data type which contains a single value NULL. Eg: $x = null;

(viii) Resource:
(a) Resource is a specific variable, it has a reference to an external resource.
(b) These variables hold specific handlers to handle files and database connections in respective PHP program.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 69.
Explain operators in PHP with example.
Answer:
Operators is a symbol which is used to perform mathematical and logical operations in the programming languages. Different types of operator in PHP are –

  1. Arithmetic Operators,
  2. Assignment Operators,
  3. Comparison Operators,
  4. Increment/Decrement operators,
  5. Logical Operators,
  6. String operators.

Arithmetic Operators:
The arithmetic operators in PHP perform general arithmetical operations, such as addition, subtraction, multiplication and division etc., The Arithmetic operators are +, -, *, / and %.

Assignment operators:
(i) Assignment operators are performed with numeric values to store a value to a variable.
(ii) The default assignment operator is “=”. This operator sets the left side opprant value of expression to right side variable.
(iii) The Assignment operators are =,+=,-=,*=,/=,%=.

Comparison operators:
(i) Comparison operators perform an action to compare two values. These values may contain integer or string data types.
(ii) The comparison operators are = =, ===, !=, <>, !==.

(vi) Maintenance:
(a) Most web designers will be working together with you, to update the information on your web site.
(b) Many designers offer maintenance packages at reduced rates, based on how often you anticipate making changes or additions to your web site.

Increment and Decrement operators:
(i) Increment and decrement operators are used to perform the task of increasing or decreasing’variable value. This operator is mostly used during iterations in the program logics.
(ii) The Increment and Decrement operators are
++$x – pre – increment
$x+ + – post – increment
– -$x – pre – decrement
$x post – decrement

Logical operators:
(i) Logical operators are used to combine conditional statements.
(ii) The logical operators are && -> And, || -> Or,! -> Not, XOR -> XOR.

String operators:
(i) Two operators are used to perform string related operations such as concatenation and concatenation assignment.
The string operators are .
. Concatenation
. = Concatenation Assignment.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 70.
Find out the following’web technology details from famous website using free web tools:
http://similarweb.com or http://pub-db.com
(i) Programming details
(ii) Webserver details
(iii) Hosting Country details.
Answer:
I. http://similanveb.com
(i) Programming details – ASP.NET, PHP
Client side – ASP. Net
Serverside -‘PHP
(ii) Webserver details – Nginx (engine x) is a light weight open source web server developed by Igor sysoev.
(iii) Hosting country details – Amazon in united states of America.

II. http://pub-db.com
(i) Programming details:
Serverside – PHP 5.4.16
Clientside – Javascript Markup – HTML 5
(ii) Web server details – Apache 2.4.6, HTTP server is a popular open source web server by Apache software foundation.
(iii) Hosting country details – Linode in Singapore.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Choose the correct answer:

Question 1.
Who was introduced the concept of internet and world wide web (www)?
(a) Berners-Lee
(b) Billgates
(c) Pichai Elango
(d) Martin glow
Answer:
(a) Berners-Lee

Question 2.
Which script language most widely used and recognizable technologies in use on the internet?
(a) TCL
(b) PHP
(c) Ruby
(d) Perl
Answer:
(b) PHP

Question 3.
CGI stands for:
(a) Central Gateway Interface
(b) Cascading Gateway Information
(c) Common Gateway Interface
(d) Common Good Interface
Answer:
(c) Common Gateway Interface

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 4.
CSS stands for:
(a) Cascading Style Sheets
(b) Cascading srever Sheets
(c) Common Style Sheets
(d) Common Server System
Answer:
(a) Cascading Style Sheets

Question 5.
Which of the following apache foundation Webserver software?
(a) Ruby
(b) Httpd
(c) Perl
(d) PHP
Answer:
(b) Httpd

Question 6.
What is default port number for MSI file from Apache foundation?
(a) 130
(b) 150
(c) 130130
(d) Both (a) and (c)
Answer:
(d) Both (a) and (c)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 7.
Which directory is located httpd.conf Webserver file?
(a) temp
(b) software
(c) conf
(d) config
Answer:
(c) conf

Question 8.
The default PHP syntax begin with:
(a) “<?PhP”
(b) “«?PHP”
(c) “?<PhP”
(d) “?<PHP>”
Answer:
(a) “<?PhP”

Question 9.
The default PHP syntax closes with:
(a) “<?”
(b) “?>”
(c) ?”>”
(d) “?”>
Answer:
(b) “?>”

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 10.
What is called storage location which can store the values for manipulation in the program?
(a) constant
(b) Integer
(c) Variable
(d) Literal
Answer:
(c) Variable

Question 11.
Which symbol is begin with PHP variable?
(a) #
(b) $
(c) *
(d) &
Answer:
(b) $

Question 12.
Which of the following is indicates the end of statement?
(a) ,(comma)
(b) .(full stop)
(c) :(colon)
(d) ;(semicolon)
Answer:
(d) ;(semicolon)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 13.
How many primitive data types supports PHP scripting language?
(a) 8
(b) 10
(c) 11
(d) 13
Answer:
(d) 13

Question 14.
String is a collection of:
(a) numbers
(b) numeric values
(c) characters
(d) symbols
Answer:
(c) characters

Question 15.
Which data types denote the two possible states?
(a) Integer
(b) Float
(c) Array
(d) Boolean
Answer:
(d) Boolean

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 16.
Which data type has multiple values in single variable?
(a) Integer
(b) Float
(c) Array
(d) Boolean
Answer:
(c) Array

Question 17.
Which function is used to dump information about a variable?
(a) var_dump()
(b) dump()
(c) var_x()
(d) var_dumpx()
Answer:
(a) var_dump()

Question 18.
What is the special data type which contains a single value?
(a) Boolean
(b) Array
(c) NULL
(d) Resource
Answer:
(c) NULL

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 19.
Which operator performs to finding remainder in division?
(a) %(module)
(b) /(division)
(c) \(back slash)
(d) – (minus)
Answer:
(a) %(module)

Question 20.
Which is similar Assignment expression for x + = y?
(a) x + y
(b) x = x + y
(c) x + y = y
(d) y = y + x
Answer:
(b) x = x + y

Question 21.
Which of the following operator is not equal?
(a) ! =
(b) <>
(c) = = =
(d) Both (a) and (b)
Answer:
(d) Both (a) and (b)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 22.
What is called two operators are used to perform string related operations?
(a) concatenation
(b) concatenation assignment
(c) Both (a) and (b)
(d) assignment
Answer:
(c) Both (a) and (b)

Question 23.
HTTP stands for:
(a) Hyper Text Transfer Protocol
(b) Hyper Text Transmission Protocol
(c) Hyper Text Transfer Preprocessor
(d) Hyper Text Transmission Preprocessor
Answer:
(a) Hyper Text Transfer Protocol

Question 24.
PHP scripts are executed on:
(a) ISP computer
(b) client computer
(c) server computer
(d) depends on PhP scripts
Answer:
(c) server computer

Question 25.
Which of the following statements prints in PhP?
(a) out
(b) write
(c) echo
(d) display
Answer:
(b) write

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 26.
In PHP a variable needs to be declare before assign:
(a) True
(b) False
(c) Depends on website
(d) Depends on server
Answer:
(b) False

Question 27.
What will be the output of the PHP code?
1. <?php
2. $Total = “25”;
3. $more = 10;
4. $Total = $Total + Smore;
5. echo “$Total”;
6. ?>
(a) Error
(b) 2510
(c) 35
(d) 10
Answer:
(c) 35

Question 28.
Which statement will output $x on the screen?
(a) echo “\$x”;
(b) echo “$$x”;
(c) echo “/$x”;
(d) echo “$x”;
Answer:
(a) echo “\$x”;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 29.
What will be the output of the following PhP code?
1. <?PhP
2. $a = “clue”;
3. $a = “get”;
4. echo “$a”;
5. ?>
(a) get
(b) true
(c) false
(d) clueget
Answer:
(d) clueget

Question 30.
What will be the output of the following PHP code?
1. <? php
2. $a = 5;
3. $b = 5;
4. echo “$a”;($a=$b)
5. ?>
(a) 5==5
(b) error
(c) 1
(d) false
Answer:
(c) 1

Question 31.
Match the following:

(A) CSS (i) Web server
(B) Java script (ii) Server side script
(C) ASP (iii) HTML method
(D) Apache Tomcat (iv) Client side script

(a) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(b) (A) – (iv); (B) – (ii); (C) – (i); (D) – (iii)
(c) (A) – (ii); (B) – (i); (C) – (iii); (D) – (iv)
(d) (A) – (ii); (B) – (iv); (C) – (iii); (D) – (i)
Answer:
(a) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (I)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 32.
Match the following:

(A) Web server (i) OPP’s
(B) PHP (ii) Software
(C) client (iii) Service provider
(D) Server (iv) Service requester

(a) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(b) (A) – (ii); (B) – (i); (C) – (iv)- (D) – (iii)
(c) (A) – (iii); (B) – (i); (C) – (iv); (B) – (ii)
(d) (A) – (iii); (B) – (ii); (C) – (i); (D) – (iv)
Answer:
(b) (A) – (ii); (B) – (i); (C) – (iv)- (D) – (iii)

Question 33.
Match the following:

(A)”<?” (i) php variable begins
(B) “?>” (ii) Statement ends
(C) $ (iii) begin php statement
(D) ; (iv) Closes php statement

(a) (A) – (iii); (B) – (i); (C) – (ii); (D) – (iv)
(b) (A) – (iv); (B) – (i); (C) – (iii); (D) – (ii)
(c) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)
(d) (A) – (iv); (B) – (ii); (C) – (iii); (D) – (i)
Answer:
(c) (A) – (iii); (B) – (iv); (C) – (i); (D) – (ii)

Question 34.
Match the following:

(A) String (i) Non decimal number
(B) Integer (ii) Multiple values
(C) Array (iii) Single values
(D) NULL (iv) With double Quotes

(a) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(c) (A) – (iii); (B) – (ii); (C) – (i); (D) – (iv)
(d) (A) – (iii); (B) – (i); (C) – (iv); (D) – (ii)
Answer:
(a) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 35.
Match the following:

(A) % (i) Not equal
(B) != (ii) Module
(C) ++$x (iii) Not
(D) ! (iv) Pre increment

(a) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(b) (A) – (iii); (B) – (ii); (C) – (i); (D) – (iv)
(c) (A) – (iii); {B) – (i); (C) – (iv); (D) – (ii)
(d) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
Answer:
(d) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Question 36.
Choose the incorrect pair:
(a) PHP – Server side
(b) ASP – client side
(c) IIS – web server
(d) Web server – software
Answer:
(b) ASP – client side

Question 37.
Choose the incorrect pair:
(a) String – character
(b) Float – decimal
(c) Array – multiple
(d) Object – numeric
Answer:
(d) Object – numeric

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 38.
Choose the incorrect pair:
(a) = = – equal
(b) == = – equal to
(c) ! = – not equal
(d) !== – Not identical
Answer:
(b) == = – equal to

Question 39.
Choose the correct pair:
(a) &&- OR
(b) || – AND
(c) ! – NOT
(d) XOR – XR
Answer:
(c) ! – NOT

Question 40.
Choose the correct pair:
(a) URL – directory
(b) HTTP – statement
(c) Server – clients
(d) Browser – hardware
Answer:
(c) Server – clients

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 41.
Choose the incorrect statement:
(a) PHP is a one of the important server side web and general purpose scripting language.
(b) PHP scripting language can be executed via an interpreter.
(c) PHP is an open source community development initiation.
(d) PHP scripting language was developed by microsoft corporation.
Answer:
(d) PHP scripting language was developed by microsoft corporation.

Question 42.
Choose the incorrect statement:
(a) The server is a high performance hardware machine.
(b) The client is a individual software which is connected in the network.
(c) The server is called as service provider.
(d) The client is called as service requester.
Answer:
(b) The client is a individual software which is connected in the network.

Question 43.
Choose the incorrect statement:
(a) Single Tier architecture is used for the user, accessed by database administrator.
(b) The client application runs inside the server machine itself.
(c) Web server is software which is running in server hardware.Answer:
(d) Web server takes the responsibilities for compilation and execution of server side scripting language.
Answer:
(a) Single Tier architecture is used for the user, accessed by database administrator.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 44.
Choose the correct statement:
(a) PHP is fully same client side scripting language like Java script.
(b) PHP also supports OPP’s concepts.
(c) Website development and hosting through software.
(d) The process of development also include computer generation.
Answer:
(b) PHP also supports OPP’s concepts.

Question 45.
Choose the correct statement:
(a) The variable in PHP begins with a * (asterisk) symbol
(b) ,(comma) indicates the PhP end statement.
(c) PHP scripting language supports 13 primitive data types.
(d) String is a collection of characters within single quotes.
Answer:
(c) PHP scripting language supports 13 primitive data types.

Question 46.
Assertion (A):
In 1990’s British scientist Tim Berners-Lee introduced the concept of internet and World Wide Web (www).
Reason (R):
These concepts required a new set of programming languages over the network communication and also recently called as web scripting, language.
(a) Both A and R are true, and R is the correct explanation for A
(b) Both A and R are true, But R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(a) Both A and R are true, and R is the correct explanation for A.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 47.
Assertion (A):
The main objective of internet implies that an application is shared by more than one hardware either it could be server or client machine.
Reason (R):
Internet was emerging in the computer network field.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(b) Both A and R are true, but R is not the correct explanation for A.

Question 48.
Assertion (A):
Webserver is software which is running in server hardware.
Reason (R):
The architecture is used for the server, accessed by Data Base Administrator.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true,but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(c) A is true, But R is false.

Question 49.
Assertion (A):
PHP script language is not supports Object Oriented Programming (OOP’s) concepts.
Reason (R):
Webserver software is available as open source or licensed version in the market.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, and R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(d) A is false, But R is true.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 50.
Assertion (A):
PHP scripts can be written inside of HTML code and save the file with extension of HTML.
Reason (R):
The embeded PHP file get executed by the Java interpreter.
(a) Both A and R are true.
(b) Both A and R are False.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(b) Both A and R are False.

Question 51.
Pick the odd one out.
(a) Ruby
(b) PHP
(c) ASP
(d) CGI
Answer:
(d) CGI

Question 52.
Pick the odd one out.
(a) String
(b) Integer
(c) Open
(d) Float
Answer:
(c) Open

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 53.
Pick the odd one out.
(a) %
(b) *
(c) +
(d) S
Answer:
(d) S

Question 54.
Pick the odd one out.
(a) ! =
(b) & &
(c) ||
(d) !
Answer:
(a) ! =

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 55.
Pick the odd one out.
(a) /* */
(b) “<?”
(c) #
(d) ||
Answer:
(b) “<?”

Question 56.
What does PHP stand for?
(a) Personal Home Page
(b) Hypertext Preprocessor
(c) Pretext Hypertext Processor
(d) Pre-processor Home Page
Answer:
(b) Hypertext Preprocessor

Question 57.
What does PHP files have a default file extension?
(a) .html
(b) .xml
(c) .php
(d) .ph
Answer:
(c) .php

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 58.
A PHP script should start with ……….. and end with ………
(a) <php>
(b) < ? php ? >
(c) < ? ? >
(d) < ?php? >
Answer:
(c) < ? ? >

Question 59.
Which of the following must be installed on your computer so as to run PHP script?
(a) Adobe
(b) windows
(c) Apache
(d) IIS
Answer:
(c) Apache

Question 60.
We can use ……………… to comment a single line?
(i) /?
(ii) //
(iii) #
(iv) /**/
(a) Only (ii)
(b) (i), (iii) and (iv)
(c) (ii), (iii) and (iv)
(d) Both (ii) and (iv)
Answer:
(c) (ii), (iii) and (iv)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 61.
Which of the following PHP statement/statements will store 41 in variable num?
(a) Both (i) and (ii)
(b) All of the mentioned.
(c) Only (iii)
(d) Only (i)
(e) $num=41
Answer:
(e) $num=41

Question 62.
What will be the output of the following PHP code?
<?php
$num = 1;
$numl = 2;
print $num . “+”. $numl;
?>
(a) 3
(b) 1+2
(c) 1.+.2
(d) Error
Answer:
(b) 1+2

Question 63.
Which of the following PHP statements will output Hello World on the screen?
(a) echo (“Hello World”);
(b) print (“Hello World”);
(c) printf (“Hello World”);
(d) sprintf (“Hello World”);
Answer:
(b) print (“Hello World”);

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 4 Introduction to Hypertext Pre-Processor

Question 64.
Which statement will output $x on the screen?
(a) echo “\$x”;
(b) echo “$$x”;
(c) echo “/$x”;
(d) echo “$x;
Answer:
(a) echo “\$x”;

Question 65.
Which of the below symbols is a newline character?
(a) \r
(b) \n
(c) /n
(d) /r
Answer:
(b) \n

TN Board 12th Computer Applications Important Questions

TN Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 1.
Define function calling.
Answer:
A function declaration part will be executed by a call to the function. Programmer has to create function calling part inside respective program.

Question 2.
Define Arguments.
Answer:
The Arguments are mentioned after the function name and inside of the parenthesis. There is no limit for sending arguments, just separate them with a comma notation.

Question 3.
Write the associative array syntax.
Answer:
Syntax:
array (keyl =s> value1. key2 => value2, keyn => value n, etc); where,
key – specifies the numeric or string type of key. value – specifies the value.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 4.
What is needed to be able to use image function?
Answer:
GD library is needed to execute image function.

Question 5.
How to create an empty array in PHP?
Answer:
It is very easy to create an array in PHP. We can create an array in PHP using array 0 function or simply assigning [ ] in front of variable.
Eg: $array = [ ]

Question 6.
How to get number of elements in an array?
Answer:
Use count 0 function to count the number of elements in an PHP array.
Eg:
$array = [‘ram’, ‘ravi’, ‘rani’, ‘raja’]-; echo count (Sarray);
Output: 4

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 7.
Write a simple program in PHP to define a function.
Answer:
// Define a function
function add_numbers( ).
{
echo 1+2; .
}
add_numbers( );
?> .
Output: 3

Question 8.
What is the default of array?
Answer:
Any new array is always initialized with a default value as follows.

  1. For byte, short, int, long – default value is zero (0)
  2. For float, double – default value is 0.0
  3. For Boolean – default value is false
  4. For object – default value is null.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 9.
Can we declare array size as a negative number?
Answer:
No, we cannot declare the negative integer as an array-size.
If we declare, there will be no compile time error.
However, we will get negative array size exception at run time.

Question 10.
What will be output of the following PHP code?
Answer:
<? php
function calc ($price, Stax = ” “)
{
Stotal = Sprice + (Sprice * Stax); echo “Stotal”;
)
calc (42);
?> .
Output: 42

Question 11.
Write a PHP program to valid an email address.
Answer:
<? php
function valid_email ($email)
{
Sresult = trim ($email); .
if (filter_var ($ result, FILTER_VALIDATE_EMAIL) ) {
return “true”;
}
else .
{
echo “false”;
} .
• }
‘ ?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 12.
What are the features of PHP functions?
Answer:

  1. PHP functions are reducing duplication of code.
  2. PHP functions are decomposing complex problems into simpler pieces.
  3. PHP functions are improving clarity of the code.
  4. PHP functions are reuse of code.
  5. PHP functions and Information hiding.
  6. PHP arrays are using for each looping concepts.

Question 13.
Write a PHP functions with one a argument program.
Answer:
<?php
function School_Name($sname)
{
echo $sname.”in Tamilnadu.<br>”;
}
School_Name (“Government Higher Madurai”);
School_Name (“Government Higher Trichy”);
School_Name .(“Government Higher Chennai”);
School_Name (“Government Higher Kanchipuram”);
School_Name (“Government Higher Tirunelveli”);
?>

Question 14.
Write a PHP function with two arguments program.
Answer:
<?php .
function School_Name (Ssname,$Strength) {
echo Ssname.”in Tamilnadu and Student Strength is” .$Strength;
}
School_Name (“Government Higher Secondary School Madurai”,200);
School_Name (“Government Higher Secondary School Trichy”,300);
School_Name (“Government Higher Secondary School Chennai”,250);
School_Name (“Government Higher Secondary School Kanchipuram”,100);
School_Name (“Government Higher Secondary School . Tirunelveli”,200);
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 15.
Write a PHP function program to return a value, use the return statement.
Answer:
<?php
function sum($x, $y) { ‘
$z – $x + $y;
return } .
echo “5 + $z;
10 = ” . sum(5,10) . “<br>”;
echo “7 + 13 = ” . sum(7,13) . “<br>”;
echo
?> “2 + 4 = ” . sum(2,4);

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 16.
Define Function in PHP.
Answer:
A block of segment in a program that performs a specific operation tasks (Insert, execute, delete, calculate etc.,). This segment is known as function. A function is a type of sub- routine or procedure in a program.

Question 17.
Define User define Function.
Answer:
Besides the built-in PHP functions, we can create our own functions. A functions is a block of statements that can be used repeatedly in a program is called user define function.

Question 18.
What is parameterized Function.
Answer:
PHP parametrized functions are the functions with parameters or arguments. The parameter is also called as arguments, it is like variable.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 19.
List out System defined Functions.
Answer:

  1. A function is already created by system it is a reusable piece or block of ‘ code that performs a specific action.
  2. Function can either return values when called or can simply perform an operation without returning any value.

Question 20.
Write Syntax of the Function in PHP.
Answer:
Syntax:
function functionName ( )
{
custom Logic code to be executed;
}

Question 21.
Define Array in PHP.
Answer:
Array is a concept that stores more than one value of same data type (homogeneous) in single array variable.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 22.
Usage of Array in PHP.
Answer:

  1. Array in PHP is one of the most useful aspects of using arrays.
  2. PHP is combined with the foreach statement, this allows you to quickly loop through an array with very little code.

Question 23.
List out the types of array in PHP.
Answer:
They are 3 types of array concepts in PHP.

  1. Indexed arrays
  2. Associative array and
  3. Multi – dimensional array.

Question 24.
Define associative array.
Answer:
Associative arrays are a key-value pair data structure. Instead of having storing data in a linear array, with associative arrays we can store our data in a collection and assign it a unique key which we may use for referencing our data.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 25.
Write array Syntax in PHP.
Answer:
Array syntax:
$ Array_variable = array(“value1”, “value2”, “value3”);
where,
array – keyword of array ( )
value 1 – value at 0th position,
value 2 – value at 1st position,
value 3 – value at 2nd position.

Question 26.
Write the features System define Functions.
Answer:

  1. A system define function is already created by the system.
  2. It is reusable piece of code that performs specific action.
  3. Functions can either return values when called or can simply perform an operation without returning any value.

Question 27.
Write the purpose of parameterized Function.
Answer:

  1. Required information can be shared between function declaration and function calling part inside the program.
  2. The parameter is also called as arguments, it is like variables.
  3. The arguments are mentioned after the function name and inside of the parenthesis.
  4. There is no limit for sending arguments, just separates them with a common notation.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 28.
Differentiate user define and system define Functions.
Answer:

User defined function

 System defined function

Besides the built in PHP functions, we can create our own functions.A function is already created by system.
A function is a block of statement that can be used repeatedly in a program.It is a reusable piece or block of code that performs a specific action.
A function declaration part will be executed by a call to the function Programmer has to create function calling part inside the respective program.Functions can either return values when called or can simply perform an operation without returning any value.

Question 29.
Write Short notes on Array.
Answer:

  1. Arrays in PHP is a type of data structure that allows us to store multiple elements of similar data type under a single variable thereby saving us the effort of creating a different variable for every data.
  2. The arrays are helpful to create a list of elements of similar types,which can be accessed using their index or key.
  3. An array is created using an array ( ) function in PHP. All PHP array elements are assigned to an index number by default.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 30.
Differentiate Associate array and Multidimensional array.
Answer:

Associate array

 Multidimensional array

Associative arrays are a key – value pair data structure. A multidimensional array is an array containing one or more arrays.
Instead of having storing data in a linear array, with associative arrays you can store your data in a collection and assign it a unique key which you may use for referencing your data. PHP understands multidimensional arrays that are two, three, four, five or more levels deep.
Associative arrays are arrays that use named keys that you assign to them. However, arrays more than three levels deep are hard to manage for most people.

Question 31.
Explain Function concepts in PHP.
Answer:

  1. A function is a type of subroutine or procedure in a program.
  2. In most of the programming language, a block of segment in a program that perform a specific operation tasks (Insert, execute, delete, calculate etc.,) This segment is also known as function.
  3. A function will be executed by a call to the function and the function returns any data type values or NULL value to called function in the part of respective program.
  4. The function can be divided into three types as user defined function, pre – defined and parameterized function.
  5. User defined functions in PHP gives a privilege to user to write own specific operation inside of existing program module.
  6. PHP has over 700 functions built in that perform different tasks.
  7. Built in functions are functions that exist in PHP installation package.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 32.
Discuss in detail about User define Functions.
Answer:
(i) User defined function in PHP gives a privilege to user to write own specific operation inside of exiting program module.
(ii) A user defined function declaration begins with the keyword function.
(iii) User can write any custom logic inside the block.
(iv) A function declaration part will be executed by a call to the function.
(v) Programmer has to create function calling part inside the respective program.
(vi) The syntax of user defined function is
function fanctionName ( )
{
codes
}

Question 33.
Explain the multidimensional array.
Answer:

  1. A Multidimensional array is an array containing one or more arrays.
  2. PHP understands multidimensional arrays that are two, three, four, five, or more levels deep.
  3. However, arrays more than three levels deep are hard to manage for most people.
  4. The dimension of an array indicates the number of indices you need to select an element.
  5. For a two-dimensional array you need two indices to select an element.
  6. For a three-dimeiisional array you need three indices to select an element.
  7. The advantage of multidimensional array is detailed information can be stored.
  8. On top level, it can either be kept indexed or associative, which makes it more user-friendly, as they can use it as per their requirements.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 34.
Explain Array concepts and their types.
Answer:
Array is a concept that stores more than one value of same data type (homogeneous) in single array variable,
There are three types of array concepts in PHP. They are
(i) Indexed arrays
(ii) Associative array and
(iii) Multi-dimensional array.
The syntax of array is
$Array – variable = array (“value1”, “value2”, “value3);
Where,
$Array – variable – Array variable name
array – keyword of array
value 1 – value at 0th position
value 2 – value at 1st position
value 3 – value at 2nd position

(i) Indexed Arrays:
Arrays with numeric index for the available values in array variable which contains key value pair as user / developer can take the values using keys.
Eg:
<?php
Sstudents = array (“YUVA”, “SEENO”, “GUNA”); ,
?>
the $students names are stored the index value of $students(0), $student(1), $student(2) respectively.

(ii) Associative Array:
Associative arrays are a key-value pair data structure. Instead of having storing data in a linear array, with associative arrays you can store your data in a collection and assign it a unique key which you may use referencing your data. .
Eg:
<? php
Smarks = array (“Ram” => “35”, “RAJA” => “30”, “PALAN” => “25”);
?>

(iii) Multidimensional Array:
A multidimensional array is an array containing one or more arrays. PHP understands multidimensional arrays that are two, three, four, five, or more levels deep. However, arrays more than three levels are hard to manage for most people.
Eg:
<?php
$students = array ,
(
array (“$enthilkumar”, 100, 96), array (“Dharani”, 60, 59) , array (“Murugan”, 89, 68)
) ;

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 35.
Explain Indexed array and Associate array in PHP.
Answer:
Indexed Array:
There are two ways to create indexed arrays.
The index can be assigned automatically (index always starts at 0), like this ($student = array “RAM”, “VELU”, “PALANI”); the index can be assigned as
$student[0] = “RAM”;
Sstudent[1] = “VELU”;
Sstudent[2] = “PALANI”;
In another indexed array is loop through an indexed array, to loop through and print all the value of an indexed array, we could use a for loop.
Eg:
<?php
$cars = array (“VOIVO”, “BMW”,
$arrlength = count (Scars);
for ($x =0; $x < $arrlength; $x++)
{
echo $cars [$x]; echo “<br>”;
}
?>

Associative Arrays:
Associative arrays are arrays that use named keys that we assign to them.
There are two ways to create an associative arrays.
Eg:
Sage = array (“RAM” => “35”);
“VELU” => 40, “PALANI” > = 45);
(or)
Sage [‘RAM’] = “35”;
Sage [‘VELU’] = “40”;
Sage [‘PALANI’] = “45”;
The named key can then be used in a script.
In another way is to loop through and print all the values of an associative array, we could use a‘foreach’loop.
Eg:
<?php
$age = array (“RAM” => “35”, “VELU” = “40”, “PALANI” => “45”);
foreach ($age as $x $x_value)
{
echo “key=”.$x.”, value=”.$x_value; echo “<brs”;
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 36.
Create store the student details arrays and display the values.
Answer:
<?php
Sstudents = array (“RAM” => “90”, “mani” => “80”,
“Kumar” => “70”);
print_r ($students);
echo “Ram got”. $students [“Ram”];
?>
Output: Ram got 90

Question 37.
List out real world Built-in string function usages in PHP.
Answer:

  1. To get length of string – strlen(string);
  2. counting the number of words in string – str word count (string);
  3. Reversing a string – strev (string);
  4. Finding text within a string – strpos (string, text);
  5. Replacing text within a string – strjreplace (string to be replaced, text, string);
  6. Converting lower case into Title case – Ucwords (string);
  7. Converting a whole string into upper case – strtoupper (string);
  8. Comparing strings – string (string 1, string2);

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Choose the correct answer:

Question 1.
Which is also called as arguments?
(a) Parameter
(b) Function
(c) Subroutine
(d) Constants
Answer:
(a) Parameter

Question 2.
How many types of array concepts in PHP?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(b) 3

Question 3.
Which is one of the most useful aspects of using arfays in PHP?
(a) For each statement
(b) Conditional statement
(c) branch statement
(d) loop statement
Answer:
(a) For each statement

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 4.
PHP’s numerically indexed array begin with position:
(a) 1
(b) 2
(c) 0
(d) -1
Answer:
(c) 0

Question 5.
Which of the following are correct ways of creating an array?
(i) state [0] = “TAMILNADU”;
(ii) state [f] = array (“TAMILNADU”); –
(iii) $state [0] = “TAMILNADU”;
(iv) $state = array (“TAMILNADU”);
(a) (iii) and (iv)
(b) (ii) and (iii)
(c) only (i)
(d) (i), (ii) and (iv)
Answer:
(a) (iii) and (iv)

Question 6.
Which function will return true if a variable is an array or false if it not?
(a) this_array ()
(b) is_array ()
(c) do array ()
(d) in_array ()
Answer:
(b) is_array ()

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 7.
What will be the output of the following PHP code?
<?php
$Fruits = array (‘apple’,orange’, ‘banana’);
echo (next (Sfruits));
echo (next ($fruits));
?>
(a) orangeorange
(b) appleorange
(c) orangebanana
(d) appleapple
Answer:
(c) orangebanana

Question 8.
What will be the output of the following PHP code?
$x = array (“aaa”, “bbb”, “ccc”, “bbb”, “ddd”, “bbbb”);
$y = array_count_values ($x) ; echo $y (bbb);
?>
(a) 2
(b) 3
(c) 4
(d) 1
Answer:
(a) 2

Question 9.
What will be the output of the following PHP code?
<? php
$x = array (1, 3, 2, 4, 5, 6, 2,- 4);
$y = array_count_values ($x);
echo $y [6];
?>
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(a) 1

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 10.
Which operator is used to concatenate two strings in PHP?
(a) (•) – dot operator
(b) (+) – operator
(c) (,) – comma operator
(d) (:) – colon operator
Answer:
(a) (•) – dot operator

Question 11.
PHP variable are:
(a) single type variable
(b) multi type variable
(c) double type variable
(d) trible type variable
Answer:
(b) multi type variable

Question 12.
In PHP the error control operator is:
(a) .
(b) *
(c) @
(d) &
Answer:
(c) @

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 13.
PHP is a:
(a) client side script language
(b) server side script language
(c) even – driven language
(d) High – level language
Answer:
(b) server side script language

Question 14.
The PHP syntax is most similar to:
(a) Pearl and C
(b) Java script
(c) VB script
(d) Visual Basic
Answer:
(a) Pearl and C

Question 15.
Which of the following function is used for terminate the script execution in PHP?
(a) break ()
(b) quit ()
(c) die ()
(d) stop ()
Answer:
(c) die ()

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 16.
Match the following:

(A) Function (i) Built in function
(B) User defined function (ii) Ideal solution
(C) System defined function (iii) Arguments
(D) Parameterized function (iv) System created

(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (ii); (B) – (iii); (C) – (i); (D) – (iv)
(c) (A) – (iv); (B) – (i); (C) – (iii); (D) – (ii)
(d) (A) – (iv)- (B) – (ii); (C) – (i); (D) – (iii)
Answer:
(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Question 17.
Match the following:

(A) Array (i) More arrays
(B) Associative array (ii) Data set
(C) Indexed arrays (iii) named keys
(D) Multidimensional array (iv) Heterogeneous data

(a) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(c) (A) – (ii); (B) – (iii); (C) – (iv); (D) – (i)
(d) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
Answer:
(b) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)

Question 18.
Choose incorrect pair:
(a) PHP – server side
(b) Function – subroutine
(c) NULL – data type
(d) UDF – Language
Answer:
(d) UDF – Language

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 19.
Choose correct pair:
(a) Parameter – Arguments
(b) calling – variable
(c) Array – Function
(d) data – operator
Answer:
(a) Parameter – Arguments

Question 20.
Choose incorrect statement:
(a) PHP has over 700 functions built-in that perform different tasks.
(b) Built-in functions are functions that exist in PHP installation package.
(c) In PHP client side scripting language.
(d) A function is a type of procedure in a program.
Answer:
(c) In PHP client side scripting language.

Question 21.
Choose the correct statement.
(a) The parameter is also called Recursion.
(b) A function declaration part will be executed by a call to the function.
(c) Programmer has to create function calling part outside the respective program.
(d) PHP function can be divided in to two types..
Answer:
(b) A function declaration part will be executed by a call to the function.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 22.
Assertion (A):
A user – defined function declaration begins with the keyword ‘function’.
Reason (R):
Functions and array concepts are very important to solve the many complex problems in real world.
(a) Both A and R are True, and R is the correct explanation fpr A.
(b) Both A and R are True, but R is the not correct explanation for A.
(c) A is True, but R is false.
(d) A is false, but R is true.
Answer:
(b) Both A and R are True, but R is the not correct explanation for A.

Question 23.
Assertion (A):
Associative arrays are a key-value pair data structure.
Reason (R):
A multidimensional array is an array containing single value.
(a) Both A and R are True, and R is the correct explanation for A.
(b) Both A and R are True, but R is the not correct explanation for A.
(c) A is True, but R is false.
(d) A is false, but R is true.
Answer:
(c) A is True, but R is false.

Question 24.
Pick the odd one out:
(a) Associative
(b) Function
(c) Indexed
(d) Multi-dimension
Answer:
(b) Function

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 25.
Pick the odd one out:
(a) Arrays
(b) User defined
(c) System defined
(d) Built-in
Answer:
(a) Arrays

Question 26.
Which one of the following is the right way of defining a function in PHP?
(a) function { function body }
(b) data type functionNamefparameters) { function body }
(c) functionName(parameters) {function body }
(d) function functionName(parameters) {function body }
Answer:
(d) function functionName(parameters) {function body }

Question 27.
A function in PHP which starts with (double underscore) is know as:
(a) Magic Function
(b) Inbuilt Function
(c) Default Function
(d) User Defined Function
Answer:
(a) Magic Function

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 28.
PHP’s numerically indexed array begin with position:
(a) 1
(b) 2
(c) 0
(d) -1
Answer:
(c) 0

Question 29.
Which of the following are correct ways of creating an array?
(i) state[0] = “Tamilnadu”;
(ii) $state[ ] = array(“Tamilnadu”);
(iii) $state[0] = “Tamilnadu”;
(iv) $state = array{“Tamilnadu”);
(a) (iii) and (iv)
(b) (ii) and (iii)
(c) Only (i)
(d) (ii), (iii) and (iv)
Answer:
(a) (iii) and (iv)

Question 30.
What will be the output of the following PHP code?
<?php
$a=array(“A”, “Gat”, “Dog”, “A”, “Dog”);
$b=array(“A”, “A” “Cat”, “A”, “Tiger”); –
$c=array_combine($a,$b);
print_r(array_count_vaiues($c));
?>
(a) Array ([A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1)
(b) Array ([A] => 2 [Cat] => 2 [Dog] => 1 [Tiger] => 1)
(c) Array ([A] ==> 6 [Cat] => 1 [Dog] => 2 [Tiger] => 1)
(d) Array ([A] => 2 [Cat] => 1 [Dog] => 4 [Tiger] => 1 )
Answer:
(a) Array ([A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 31.
For finding nonempty elements in array we use:
(a) is_array () function
(b) sizeof ( ) function
(c) array_count () function
(d) count ( ) function
Answer:
(a) is_array () function

Question 32.
Indices of arrays can be either strings or numbers and they are denoted as:
(a) $my_array {4}
(b) $my_array [4]
(c) $my_array| 41
(d) None of them
Answer:
(b) $my_array [4]

Question 33.
PHP arrays are also called as:
(a) Vector arrays
(b) Perl arrays
(c) Hashes
(d) All of them
Answer:
(d) All of them

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 5 PHP Function and Array

Question 34.
As compared to associative arrays vector arrays are much:
(a) Faster
(b) Slower
(c) Stable
(d) None of them
Answer:
(a) Faster

Question 35.
What functions count elements in an array?
(a) count
(b) Sizeof
(c) Array Count
(d) Countarray
Answer:
(a) count

TN Board 12th Computer Applications Important Questions

TN Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 1.
When is a conditional statement ended with end if?
Answer:
When the original it was followed by and then the code block without braces.

Question 2.
What will be the values of $a and $b after the code below is executed?
Answer:
$a = ‘1’;
$b = &$a;
Sb = “2$b;
output: “21”
(Both $a and $b will be equal to the string “21” after the above code is executed)

Question 3.
Draw flow chart if elseif…else statement.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements 1

(i) This flow chart explain if, elseif…else statement, it used to take decision based on the different condition.
(ii) If condition is true, the following conditional code will be executed, if it is false exit from the conditional code.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 4.
Write a PHP program to find bigger, smaller, equal of any two number.
Answer:
<? php
if ($a>$b)
{
}echo “A is bigger than B”;
else if ($a = = $b)
{
echo “A is equal toB”;
}
else
{
echo “A is smaller than B”;
} .
?>

Question 5.
What is faster if or switch statement?
Answer:

  1. A switch statement might prove to be faster than if provided number of cases are good.
  2. If-else better for boolean values whereas switch statements are great for fixed data values.
  3. If-else statement can test expressions based on the ranges of values or conditions, whereas a switch statement tests expressions based only on a single integer, enumerated value, or string object.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 6.
Explain the following conditional statement PHP coding.
Answer:
<! DOCTYPE html>
<html>
<body>
<? php
$S = date (“D”);
if ($S < “15”) *
{
echo “working day”;
}
?>
</body>
</html>
Output: Working day
Explanation of code:
1. <? PHP . – starting php
2 . Ss = date(“D”-) – Declaring variable
3. if ($S < “15”) – If condition true code executes
4. echo – Built in function to print the text
5. ?> – closing of php

Question 7.
Write a simple php program to print grade of the student result using if… elseif…else conditional statement.
Answer:
coding:
<?php
$ result = 70;
if ($result > = 75)
{
echo “Grade A…Pass”;
}
elseif ($result > = 60)
{
echo “Grade B…Pass”;
}
elseif ($result > = 45)
{
echo “Grade C pass”;
}
else
{
echo “Fail”;
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 8.
Write a php program using switch case for string variable.
Answer:
$position = “dba”;
switch ($position)
{
case “member”:
echo “welcome member”;
break;
case “teacher”:
echo “welcome teacher”;
break;
case “student”:
echo “welcome student”;
break;
default:
echo “Welcome you all others”;
break;
}

Question 9.
Why switch statement is better for multi-way branching.
Answer:

  1. When compiler compiles a switch statement, if will inspect each of the case constants and create a jump table.
  2. A jump table that will use for selecting the path of execution depending on the value of the expression.
  3. Therefore, if we need to select among a large group of values, a switch statement will run much faster than the equivalent logic coded using a sequence of if…elses.
  4. The compiler can do this because it knows that the case constants are all the same type and simply must be compared for equality with the switch expression.
  5. While in case of it expressions, the compiler has no such knowledge.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 10.
Write a PHP program to check given character is vowel or consonant using if…else if statement.
Answer:
<? php
$char = $_post [ ‘ch’]; ,
if ($char==”a”) ‘
{
echo $char.”is vowel”;
}
elseif ($char==”e”)
{
echo $char.”is vowel”;
}
elseif ($char==”iM)
{
echo $char .”is vowel”;
elseif ($char==”o”)
{
echo $char. “is vowel”;
}
elseif ($char==”u”)
{
echo $char.”is vowel”;
}
else
{
echo $char. “is consonant”;
}
?>

Question 11.
Write a PHP program a day of the week using if…elseif…else statement.
Answer:
<?php
if ($day==”Mon”) ‘
echo “Monday”;
elseif ($day==”Tue”)
echo “Tuesday”;
elseif ($day==”Wed”)
echo “WEDNESDAY”;
elseif ($day==”Thu”)
echo “THURSDAY”;
elseif ($day==”Fri”)
echo “FRIDAY”;
elseif ($day==”Sat”)
echo “SATURDAY”;
else
echo “SUNDAY”;
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 12.
Write a PHP program day of the week using switch case statement.
Answer:
<?php
$today=date(“D”);
switch ($today)
<
case “Mon”:
echo “Today is Monday”;
break; ’
case “Tue”:
echo “Today is Tuesday”; .
break;
case “Wed”:
echo “Today is Wednesday”;
break;
case “Thu”
echo “Today is Thursday”;
break;
case “fri”
echo “Today is Friday”;
break; ‘
case “sat”
echo “Today is Saturday”;
break;
case “sun”:
echo “Today is Sunday”;
break;
default:
echo “Thank you”; break;
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 13.
Define Conditional Statements in PHP.
Answer:
Conditional statements in PHP are useful writing decision making logics. It is most important feature of many programming language.

Question 14.
Define if statement in PHP.
Answer:
If statement is a conditional branching statement. If statement executes a statement or a group of statements if a specific condition is satisfied as per the user expectation.

Question 15.
What is if else statement in PHP?
Answer:
If… else statement in PHP is the if statement executes a statement or a group of statements if a specific condition is satisfied by the user expectation. When the condition gets falls the else block is executed.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 16.
List out Conditional Statements in PHP.
Answer:
The conditional statements in PHP are
if statement, if…else statement,
if… elseif… else statement, switch statement.

Question 17.
Write Syntax of the If else statement in PHP.
Answer:
Syntax:
if (condition)
{
Execute statement(s) if condition is true;
}
else
{
Execute statement(s) if condition is false;
}

Question 18.
Define if…elseif….else Statement in PHP.
Answer:
If … elseif… else statement in PHP is a combination of if…else statement. More than one statement can execute the condition based on user needs.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 19.
Usage of Switch Statement in PHP.
Answer:

  1. The switch statement is used to perform different actions based on different conditions.
  2. Switch statement works the same as if statements but they can check for multiple values at a time.

Question 20.
Write Syntax of Switch statement.
Answer:
Syntax:
Switch (n)
{
case label 1:
code to be executed if n = label 1;
break;
case label 2:
code to be executed if n = label 2;
break;
case label 3:
code to be executed if n = label 3;
break;
——–
——–
default:
code to be executed if n is different from all labels;
}

Question 21.
Compare if and if else statement.
Answer:

If statement

 If… else statement

The if statement is used to execute a block of code only if the specified condition evaluates to true. The if…else statement allows you to execute one block of code if the specified condition is evaluates to true and another block of code if it is evaluates to false.
The if statement is quite basic because in if statement output will display when condition must be true, if condition is false it display nothing. If…else statements allows you to display output in both the conditions, that is if condition is true display some message otherwise display other message.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 22.
Write the features Conditional Statements in PHP.
Answer:

  1. PHP programmers evaluate different conditions during of a program and take decisions based on whether these conditions evaluate to true or false.
  2. if statement – executes some code if one condition is true.
  3. if., .else statement – executes some code if a condition is true and another code if that condition is false.
  4. if…elseif… else statement – executes different codes for more than two conditions.
  5. Switch statement – selects one of many blocks of code to be executed.

Question 23.
Write the purpose of if elseif else statement.
Answer:

  1. When we want to execute different code for different set of conditions, and we have more than two possible conditions, then we use if…elseif… else statement.
  2. We have also used logical operator are very useful while writing multiple condition if statement.
  3. When use if…elseif…else statement as many as you want, each condition inside if ( ) can accept logical operators like AND, OR, NOT.
  4. If… elseif…else statement is a combination of if-else statement.

Question 24.
Differentiate Switch and if else statement.
Answer:

Switch statement

 if…else statement

Switch statement is to use when the same value is compared against a set. of values. If…else can be used for any occasion where comparison need to be done.
In switch statement usually there are no conditions to evaluate, it can bit efficient over an elseif counter part. Each if statement checks a condition and operands associated with the condition can be different from one if to another attached elseif.
The switch statements work the same as if statements but they can check for multiple values at a time. The if statement is a way to make decision based upon the result of a condition.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 25.
Write Short notes on Switch statement.
Answer:
(i) Use the switch statement to select one of many blocks of code to be executed.
(ii) The switch statement is used to perform different action based on different conditions.
Syntax:
switch (n)
{
case label 1:
code to be executed if n = label 1;
break;
case label 2:
code to be executed if n = label 2;
break;
case lebel 3;
code to be executed if n = label 3;
break;
default:
code to be executed if n is different from all blocks;
}
(iii) The switch statements work the same as if statements but they can check for multiple values at a time.
(iv) The break statement is used to prevent the code from running into the next case automatically.
(v) The default statement is used if no match is found.

Question 26.
Differentiate if statement and if elseif else statement.
Answer:

if statement

 if…elseif…else statement

The if statement is used to execute a block of code only if the specified condition evaluates to true.The if…elseif…else is a special statement that is used to combine multiple if…else statement.
If statement executes a statement if a specific condition is satisfied as per the user expectation.If…elseif…else statement is a combination of if – else statement.
If statement is used simple decision making logics.If…elseif…else statement is more than one statement can execute the condition based on user needs.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 27.
Explain Function Conditional Statements in PHP.
Answer:
The PHP conditional statements are –
(i) If statement
(ii) If…else statement
(iii) If…elseif… else statement
(iv) Switch statement

(i) If statement:
This statement executes a statement or a group of statements if a specific condition is satisfied as per the user expectation.
Syntax:
if (condition)
{
Execute statements if condition is true;
}
Eg:
<?php
$pass_mark = 35;
$student_mark =70;
if ($student_mark > = $pass_mark)
{
echo “The student is eligible for promotion”;
}
?>

(ii) If…else statement:
This statement executes a statement or a group of statements if a specific condition is satisfied by the user expectation. When the condition gets false the else block is executed.
Syntax:
if (condition)
{
Execute statement(s) if condition is true;
}
else
{
Execute statement(s) if condition is false;
)
Eg:
<?php
$pass_mark = 35;
$student_mark = 70;
if ($student_mark > = $pass_mark)
{
echo “The student passed”;
}
else
{
echo “The student failed”;
}
?>

(iii) If…elseif… else statement:
This statement is a combination of if ..else statement. More than one statement can execute the condition based on user needs..
Syntax:
if (condition-1)
{
Execute statements if condition is true;
}
elseif (condition-2)
{
Execute statements if condition is true;
}
else
{
Execute statements if both conditions are false;
}
Eg:
<?php
$pass_mark = 35;
$first_class = 60;
$student_mark =70;
if ($student_mark > = $first_class)
{
echo “The student passed with first class”;
}
elseif ($student_mark > = $pass_mark.)
{
echo “The student passed”;
}
else
{
echo “The student failed”;
}
?>

(iv) Switch statement:
Refer III- Q.No – 4

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 28.
Discuss in detail about Switch statement with an example.
Answer:
The switch statement is used to perform different actions based on different conditions.
Syntax:
switch(n)
{
case label 1:
code to be executed if n = label 1;
break;
case label 2:
code to be executed if n = label 2;
break;
case label 3:
code to be executed if n = label 3;
break;
default:
code to be executed if n is different from all labels;
}

Eg:
<?php
” $f col.br = “red”;
switch ($fcolor)
{
case “red”;
echo “my favourite color is red”;
break;
case “blue”;
echo “my favourite color is blue”;
break;
case “green”:
echo “my favourite color is greeh”;
break;
default:
echo “my favourite color is neither Red, Blue, nor
green!”;
}
?>

Question 29.
Explain the process Conditional Statements in PHP?
Answer:
(i) PHP lets programmers evaluate different conditions during process of a program and take decisions based on whether these conditions evaluate to true or false.
(ii) These conditions, and the actions associated with them, are expressed by means of a programming construct called a process conditional statement. PHP supports different types of process conditional statements.
(a) The if statement: In if statements output will appear when only condition must be true.
(b) The if…else statement: If-else statements allows you to display output in both the condition if condition is true or. false.
(c) The if…elseif…else statement: The if…elseif…else statement lets you chain together multiple if-else statements, thus allowing the programmer to define actions for more than just two possible outcomes.
(d) The switch statement: The switch statement is similar to a series of if statements on the same expression.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 30.
Explain concepts of if… elseif… else statement.
Answer:
If…elseif…else statement is a combination of If…else statement. More than one statement can execute the condition based on user needs.
The if…elseif…else statement is a special statement that is used to combine multiple if., else statements.
If…elseif…else statement is more than one statement can execute the condition based on user needs.
Syntax:
If(condition-1)
{
Execute statements if condition is true;
}
elseif (condition-2)
{
Execute statements if 2nd condition is true;
}
else
{
Execute statements if both condition are false;
}

Eg:
<?php
$pass_mark =35;
$first_class = 60;
$student_mark =70;
if ($student_mark> = $first_class)
{
echo “The student passed with first class”;
}
elseif ($student_mark > = $pass_mark)
{
echo “The student passed”;
}
else
{
echo “The student failed”;
}
?>

Question 31.
Explain if else statement in PHP.
Answer:
If…else statement executes a statement or a group of statements if a specific condition is satisfied by the user expectation. When the condition gets false ‘ the else block is executed.
If…else can be used for any occasion where comparison need to be done.
If…else statement is a way to make decision based upon the result of a condition.
Syntax:
if (condition)
{
Execute statement(s) if condition is true;
}
else
Execute statement(s) if condition is false;
}
Eg:
<?php
$pass_mark = 35; .
$student_mark = 70;
if ($student_mark> = pass_mark)
{
echo “The student passed” ;
}
else
echo “The student failed”
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 32.
Create simple decision making scenario using if else statement in student management application.
Answer:
If…else:
If it raining outside, you don’t have to water the plants by yourself. So you can tell. If it is raining, I shall not water the plants, else I have to water them. So .now, we can write pseudo code.
if (raining==true)
do not water
else
do water .

Nested if…else:
If a boy is more than 13 years old, we call him teenager. If he is more than 21 years old, he is eligible for marriage. Using nested If…else.

If a boy is less than 13 years old he is not a teenager, else if he is less than 21 . years old he is not eligible for marriage else he is eligible.

Pseudo code:
If (age < 13)
“Not a Teenager”
else
{ if (age < 21)
“Not a eligible for marriage”
else
“eligible for marriage”
}

Question 33.
Explain real world usages in using Conditional Statements.
Answer:
A conditional statement is a statement that is stated in if… then format. This kind of statement is kind of statement is something that is often used to write a hypothesis in science.

The hypothesis can be created before a test is ever imagined, and the test is then designed to test the hypothesis. On the otherhand, the text might be known, and the conditional statement is then used to predict the outcome of the experiment.

Example I:
If you believe “money can’t buy happiness”
then
you’re not “spending it correctly”.

Example II:
If ”a person spends the money on himself”,
then
“he will be happier at the end of the day”.
else
If”a person doesn’t speñd the money on himself”,
then
“he will be happier at the end of the day”.

Example – III:
If son said “I do my homework”
then
Father represent “I get my payment”
The statement son → father is a conditional statement which represent “if son, then father”.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Choose the correct answer:

Question 1.
Which statement is a combination of if-else statement?
(a) If statement
(b) break statement
(c) If…elseif…else statement
(d) If…else statement
Answer:
(c) If…elseif…else statement

Question 2.
Which statement is used to perform different actions based on different conditions?
(a) If statement
(b) Switch statement
(c)If…elseif…else statement
(d) If.. .elsestatement
Answer:
(b) Switch statement

Question 3.
Which statement contains boolean expression inside brackets?
(a) if statement
(b) switch statement
(c) break statement
(d) default statement
Answer:
(a) if statement

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 4.
Which statement executes a statement if a specific condition is satisfied?
(a) if statement
(b) switch statement
(c) break statement
(d) default statement
Answer:
(a) if statement

Question 5.
What type of statements are useful for writing decision making logics?
(a) looping
(b) conditional
(c) branch statement
(d) All the above
Answer:
(b) conditional

Question 6.
What will be the output in the PHP code?
<?php
$x = 0; ‘
if ($x = = 1) ’
if ($x > = O’) ‘
print “true”; .
else
print “false”;
?>
(a) true
(b) false
(c) error
(d) no output
Answer:
(d) no output

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 7.
What will be the output in the PHP code?
<? php
$a = 1′; .
if ($a—) print “True”;
if ($a++)
print “False”; .
?>
(a) true
(b) false
(c) error
(d) no output
Answer:
(a) true

Question 8.
What will be the output in the PHP code?
<? php
$a « 1;
If (print $a)
print “true”;
else
print “false”;
?>
(a) true
(b) false
(c) error
(d) no output
Answer:
(a) true

Question 9.
What will be the output in the PHP code?
<? php
$a = ”
if ($a) .
print “all”;
if
else
print “some”;
?>
(a) all
(b) some
(c) error
(d) no output
Answer:
(b) some

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 10.
The following syntax is correct for if conditional statement.
if condition
{
code
}
(a) true
(b) false
(c) error
(d) not correct
Answer:
(a) true

Question 11.
If <expression> Where, the expression can be of which type?
(a) True
(b) Any number
(c) Any string
(d) All the above
Answer:
(d) All the above

Question 12.
What error does the if condition gives if not terminated with end statement?
(a) Syntax error
(b) Unexpected end
(c) Expecting keyword end
(d) All the above
Answer:
(d) All the above

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 13.
What is output?
if 1 < 2
Print “One is less than Two”;
end
(a) error
(b) syntax error
(c) one is less than two
(d) none
Answer:
(c) one is less than two

Question 14.
What is output?
if 11 < 2
Print “Eleven is less than two”
end
print “11 is greater”
(a) 11 is greater
(b) Eleven is less than two
(c) Eleven is less than two 11 is greater
(d) None
Answer:
(a) 11 is greater

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 15.
What is output?
<? php
$x = 12; .
if ($x >0)
{
echo “positive number”
}
else
{
echo “Negative number”
}
?>
(a) positive
(b) negative
(c) error
(d) no output
Answer:
(a) positive

Question 16.
Match the following:

(A) If (i) group of statement
(B) If – else (ii) a statement
(C) If – elseif – else (iii) multiple values
(D) Switch (iv) combination of if – else statement

(a) (A) – (ii); (B) – (iii); (C) – (i); (D) – (iv)
(b) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)
(c) (A) – (iv); (B) – (iii); (C) – (i); (D) – (ii)
(d) (A) – (iv); (B) – (i); (C) – (ii); (D) – (iii)
Answer:
(b) (A) – (ii); (B) – (i); (C) – (iv); (D) – (iii)

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 17.
Choose the incorrect pair:
(a) condition – decision
(b) if – control statement
(c) switch – multiple statement
(d) else if – another condition
Answer:
(b) if – control statement

Question 18.
Choose the incorrect statement:
(a) Switch statement work with same as while statements.
(b) The if statement is way to make decision based statement.
(c) If statement contains boolean expression inside brackets.
(d) The else statement must follow if or else if statement.
Answer:
(a) Switch statement work with same as while statements.

Question 19.
Assertion (A):
Conditional statements are useful for writing decision making logics.
Reason (R):
It is most important feature of many programming languages, including PHP
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c A is true, But R is false.
(d) A is false, But R is true.
Answer:
(a) Both A and R are true, and R is the correct explanation for A.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 20.
Pick the odd one out:
(a) If
(b) If…else
(c) break
(d) Switch
Answer:
(c) break

Question 21.
What will be the output of the following PHP code?
<?php
$x;
if ($x)
print “hi” ;
else
print “how are u”;
?>
(a) how are u
(b) hi
(c) error
(d) no output
Answer:
(a) how are u

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 22.
What will be the output of the following PHP code ?
<?php
$x = 0;
if ($x++)
print “hi”; .
else
print “how are u”;
?>
(a) hi
(b) no output
(c) error
(d) how are u
Answer:
(d) how are u

Question 23.
What will be the output of the following PHP code?
<?php
$x;
if ($x == 0)
print “hi” ;
else
print “how are u”;
print “hello”
?>
(a) how are uhello
(b) hihello
(c) hi
(d) no output
Answer:
(b) hihello

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 24.
Statement which is used to make choice between two options and only option is to be performed is written as:
(a) if statement
(b) if else statement
(c) then else statement
(d) else one statement
Answer:
(b) if else statement

Question 25.
What will be the output of the following PHP code ?
<?php
$a = “”;
if ($a)
print “all”;
if
else
print “some”;
?>
(a) all
(b) some
(c) error
(d) no output
Answer:
(b) some

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 26.
What will be the output of the following PHP code?
< ?php
$a = “” ;
if ($a)
print “all”;
if
else
print “some”;
?>
(a) all
(b) some
(c) error
(d) no output
Answer:
(b) some

Question 27.
What will be the output of the following PHP code?
<?php
$x = 10;
$y = 20;
if ($x > $y + $y != 3)
print “hi” ;
else
print “how are u”;
?>
(a) how are u
(b) hi
(c) error
(d) no output
Answer:
(b) hi

Question 28.
What will be the output of the following PHP code?
<?php
$x = 10;
$y = 20;
if ($x > $y && 1||1)
print “hi” ;
else
print “how are u”;
?>
(a) how are u
(b) hi
(c) error
(d) no output
Answer:
(b) hi

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 6 PHP Conditional Statements

Question 29.
What will be the output of the following PHP code ?
<?php
if .(-100)
print “hi” ;
else
print “how are u”;
?>
(a) how are u
(b) hi
(c) error
(d) no output
Answer:
(b) hi

TN Board 12th Computer Applications Important Questions

TN Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 1.
When to use while loops?
Answer:

  • While loops are used to execute a block of code until a certain condition becomes true.
  • We can use a while loop to read records returned from a database query.

Question 2.
Write the type of while loops.
Answer:
The two types of while loops are

  1. Do..while – Executes the block of code atleast once before evaluating the condition.
  2. While – Check the condition first. If it evaluates to true, the block of code is executed as long as the condition is true. If it evaluates to false, the execution of the while loop is terminated.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 3.
What will be the output in the php code?
Answer:
<?php $1 = 0;
while ($i < 3)
{
. echo $i +1. “<br>”;
$i ++;
}
?>
Output: 1
2
3

Question 4.
What will be the output in the php code?
Answer:
<?php
Scolors = array (“red”, “green”, “blue”, “yellow”); foreach (Scolors as Svalue)
{
echo “Svalue <br>;
>
?>
Output: red
green
blue
yellow

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 5.
What is output in the php code?
Answer:
<?php
for($i = 1; $i < 10; $i++)
{
echo $i;
} –
Output: 1 2 3 4 5 6 7 8 9

Question 6.
Write a php program using for loop in the following pattern.
1
2 3
4 5 6
7 8 9 10
Answer:
<?php
$k = 1;
for ($i =0; $i < 4; $i++)
{
for ($j = 0;$j <= $i; $j++)
{
echo $k ”
$k++;
}
echo “<br>”;
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 7.
Write a php program using for loop in the following pattern?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer:
<?php
for ($i = 0; $i >= 5; $i++)
{
for ($j = 1; $j >= $i, $j++)
{
echo $i;
} ‘
echo “<br>”;
}
?>

Question 8.
Write a PHP program using for statement in the following pattern.
Answer:
1
1 1
1 1 1
1 1 1 1
1 1 1 1 1
Answer:
<?php
for($i = 0; $i <= 5; $i++) {
for($j = 1; $j <= $i; $j++) {
echo “1”;
}
echo “<br>”;
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 9.
Write a PhP program using for statement in the following pattern.
1 1 1 1 1
1 1 1 1
1 1 1
1 1
1
Answer:
<?php
for($i = 0; $i <= 5; $i++)
{ . for($j = 5 – $i; $j >= 1; $j–)
{
echo “1”;
}
echo “<br>”;
}
?>

Question 10.
Write a PhP program using for statement in the following pattern.
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
Answer:
<?php
for ($i = 5; $i >= 1; $i —)
{
for ($j = $i; $j >= 1; $j —)
{
echo $i.” “;
}
echo “<br>”;
}
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 11.
Write a PHP program using for statement in the following pattern.
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
Answer:
<?php
for ($i =1; $i <= 5; $i++)
{
for ($j = 1; $j <= 5; $j++)
{
echo ;
}
echo “<br>”;
?>

Question 12.
What will be output?
Answer:
<?php
$n = ( );
while ($n <= 10)
{
echo “$n <br/>”;
$n++;
}
?>
Output: 0 1 2 3 4 5 6 7 8 9 10

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 13.
Define Looping Structure in PHP.
Answer:
In PHP programming it is often necessary to repeat the same block of code a given number of times, or until a certain condition is met. This can be accomplished using looping structure.

Question 14.
Define For loop in PHP.
Answer:
For loop is an important function looping system which is used for iteration logics when the programmer know in advance how many times the loop should run.

Question 15.
What is Foreach loop in PHP?
Answer:

  1. Foreach loop is exclusively available in PHP. It works only with arrays. The loop iteration depends on each KEY value pair in the array.
  2. Foreach, loop iteration the value of the current array element is assigned to $ value variable and the array pointer is shifted by one, until it reaches the end of the array element.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 16.
List out Looping Structure in PHP.
Answer:

  • For loop
  • Foreach loop
  • While loop

Question 17.
Write Syntax of For Loop in PHP.
Answer:
The syntax of For Loop in PHP is
for (init counter; test counter; increment counter)
{
code to be executed;
}
Where,
init counter – Initialize the loop initial counter value,
test counter – Evaluated for every iteration of the loop,
increment counter – Increases the loop counter

Question 18.
Write Syntax of Foreach Loop in PHP.
Answer:
The syntax of Foreach loop in PHP is
for each ($array as $value)
{
code to be executed:
}

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 19.
Write Syntax of while loop in PHP.
Answer:
The syntax of while loop in PHP is while (condition is true)
{
code to be executed;
}

Question 20.
Write Syntax of Do while loop in PHP.
Answer:
The syntax of Do while loop in PHP is
do
{
code to be executed;
}
while (condition is true);

Question 21.
Compare For loop and Foreach loop.
Answer:

For loop

 For each loop

For loop is a functional looping system which is used for iteration logics. Foreach loop works only with arrays. The loop iteration depends on each KEY value pair in the array.
For loop executes a block of code a specified number of times. The Foreach construct provides an easy way to iterate over arrays.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 22.
Usage of Foreach loop in PHP.
Answer:
Foreach loop in PHP is used loop iteration the value of the current array element is assigned to $ value variable and the array pointer is shifted by one, until it reaches the end of the array element.

Question 23.
Write the features Looping Structure.
Answer:
Looping structure in PHP are used to execute the same block of code a specified number of times. The features of looping structure are

  1. For – loops through a block of code a specified number of times.
  2. While – loops through a block of code if and as long as a specified condition is true.
  3. Do.. while – loops through a block of code once, and then repeats the loop as long as long as a special condition is true.
  4. Foreach – loops through a block of code for each element in an array.

Question 24.
Write the purpose of Looping Structure in PHP.
Answer:

  1. Looping structure in PHP is main purpose to execute a statement or a block of statements, multiple times until and unless a specific condition is met.
  2. Looping structure, the user to save both time and effort of writing the same code multiple times.
  3. PHP supports four types of looping structure for loop, while loop, do- while loop and foreach loop.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 25.
Differentiate Foreach and While loop.
Answer:

Foreach loop

 While loop

Foreach loops through a block of code for each element in an array. While loops through a block of code until the condition is evaluate true.
Foreach loop, we don’t have any idea about the number of iterations. While loop, we know already that howmany times the loop should be run.
Foreach loop is used to iterate only arrays and objects. A while loop executes orders until a certain condition is met.

Question 26.
Write short notes on Do While Loop.
Answer:
Do while loop in PHP is a variant of while loop, which evaluates the condition at the end of each loop iteration.

A Do while loop the block of code executed one, and then the condition is evaluated, if foe condition is true, the statement is repeated as long as the specified condition evaluated to is true.
Do while syntax:
do
{
code to be executed;
}
while (condition is true);
Eg:
<?php
$i = I
do
{
$i++;
echo “The number is” .$i. “<br>”;
}
while ($i <= 3);
?>

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 27.
Differentiate While and Do while loops.
Answer:

While loop

 Do while loop

While loop, the condition to be evaluated is tested at the begining of each loop iteration.Do.. while loop, the condition is evaluated at the end of the loop iteration rather than the begining.
If the conditional expression evaluates to false, the loop will never be executed.With a do – while loop, on the other hand the loop will always be executed once, even if the conditional expression is false.
While loops execute a block of code while the specified condition is true.Do – while – loops through a block of code once, and then repeats the loop as long as the specified condition is true.

Question 28.
Explain Looping Structure in PHP.
Answer:

TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure 1

This flow chart explain, if it evaluates true, the loop continues, otherwise the loop exit to outside block.
Looping structures are useful for writing iteration logics. It is the most important feature of many programming languages, including PHP.
They are implemented using the following loop structure.
• For loop
• Foreach loop
• While loop

(i) For loop:
For loop is an important functional looping system which is used for iteration logics when the programmer know in advance how many times the loop should run.
Syntax:
for (init counter; test counter; increment counter!
{
code to be executed;
}

(ii) Foreach loop:
Foreach loop is exclusively available in PHP. It works only with arrays. The loop iteration depends on each key value pair in the array.
Foreach, loop iteration the value of the current array element is assigned to $ value variable and the array pointer is shifted by one, until it reaches the end of the array element.
Syntax:
foreach ($ array as $ value)
{
code to be executed;
}

(iii) While loop:
While loop is an important feature which is used for simple iteration logics. It is checking the condition whether true or false. It executes the loop if specified condition it true.
Syntax:
while(condition)
{
code to be executed;
}

(iv) Do While loop:
Do while loop always run the statement inside of the loop block at the firstime execution. Then it is checking the condition whether true or false. It executes the loop, if the specified condition is true.
Syntax:
do
{
code to executed;
}
while (condition is true);

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 29.
Discuss in detail about For each loop.
Answer:
(i) Foreach loop is used to iterate over arrays.
(ii) Foreach loop is exclusively available in PHP. It works only with arrays.
(iii) The loop iteration depends on each key value pair in the array.
(iv) Foreach, loop iteration the value of the current array element is assigned to $ value variable and the array pointer is shifted by one, until it reaches the end of the array element.
Syntax:
foreach ($ array as $ value)
{
code to be executed;
}
Eg: seq = [50, 100, 150]
foreach X of seq
Print x
end
Foreach – supports iteration over three different kind of values arrays, Normal objects, Traversable objects.

Question 30.
Explain the process Do while loop.
Answer:
Do while loop always run the statement inside of the loop block at the first execution. Then it is checking the condition whether true or false. It executes the loop, if the specified condition is true.

TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure 2

In the above, Do while flowchart is working, run the looping code first and then check for the condition. If the specified condition is true to execute the block of code, else stop or exit the loop.
Syntax:
do
{
code to be executed;
}
while (condition is true);
Eg:
<?php
$count = 10;
$number =1;
do
{
echo “number”; $number++;
}
while ($number <= $count)
?>
The $count variable value is 10, and Snumber variable initial value 1, it’s incremented every times by 1, when it reached the Snumber value is 10, then the loop will be closed.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 31.
Explain concepts of For loop with example.
Answer:
For loop:
For loop is an important functional looping system which is used for iteration logics when the programmer know in advance how many times the loop should run.
Syntax:
forfinit counter; test counter; increment counter)
{
code to be executed;
}
Where,
init counter – Initialize the loop initial counter value,
test counter – Evaluated for every iteration of the loop, if it evaluates true, the loop continues. If it evaluates to FALSE, the loop ends.
Increment counter – Increases the loop counter value.
Eg:
<?php
for ($i = 0; $i< = 10; $i++)
{
echo “The number is : $i <br>”;
}
?>

For loop structure is

TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure 3

The for structure will be executed again and again when the condition is true, otherwise exit from the loop.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 32.
Explain array concepts in Looping Structure.
Answer:
(i) The Foreach loop is mainly used for looping through the values of an array.
(ii) It loops over the array, and each value for the current array element is assigned to $ value, and the array pointer is advanced by one to go the next element on the array.
(iii) Foreach loop is exclusively available in PHP. It works only with arrays.
(iv) The loop iteration depends on each key value pair in the array.
(v) Foreach, loop iteration the value of the current array element is assigned to $ value variable and the array pointer is shifted by one, until it reaches the end of the array element.
(vi) The Foreach construct provides an easy way to iterate over arrays.
Syntax for Foreach loop:
foreach ($ array as $ value)
{
code to be executed;
}
Eg:
m = [10, 20, 30]
foreach i of m
print i
end

Question 33.
Create simple array element and display the values using Foreach.
Answer:
<?php
$marks = array (“98”, “78”, “88”, “90”);
foreach($marks as $value)
{
echo “$value <br>”;
}
?>
Output:
98
78
88
90

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 34.
Explain real world usages in using looping structure.
Answer:

  1. Using facebook as an example for real world usage in using looping structure.
  2. Chatting, Sending message, Photos, articles etc., are using in our account that are may reached around the world wide.
  3. Click to view our friends list. Every body has a variable number of friends, so need code to iterate over each friend to display their photo, name, and profile link.
  4. In facebook update our friend request/ messages/ notification at the top of the page.
  5. This would generally use a loop as we would not want to be requesting an update constantly yet we do want the browser to check periodically for an update.
  6. As far as how loops would be used for facebook – style application, it would mainly displaying a sequence of entries, such as list of friends or people.
  7. We would retrieve the list or array structure, and then use a loop to walk through the list and generate something like to display.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Choose the correct answer:

Question 1.
What will be output in the PHP code?
<?php
$i = 0
while ($i < 5)
{
echo $i + 1. “<br>”;
$i++;
}
?>
(a) 1
2
3
4

(b) 1
2
3
4
5

(c) 1
2
3
4
5
6

(d) 0
1
2
3
4
5
Answer:
(b) 1
2
3
4
5

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 2.
What will be the output in the PhP code?
<?php
$i = 9;
do
{
echo “$i is”. “<br>”;
}
while ($i < 9);
?>
(a) 10
(b) 8
(c) 9
(d) 11
Answer:
(c) 9

Question 3.
Which loop works only arrays and objects?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(b) Foreach

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 4.
Which loop always run the statement inside of the loop block?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(d) Do while

Question 5.
Which loop is used for simple iteration logic?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(c) While

Question 6.
Which loop is exclusively available in PHP?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(b) Foreach

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 7.
Which loops execute through a block of code as long as the specified condition is true?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(c) While

Question 8.
Which loops execute through a block of code once, and then repeats the loop as long as the specified condition is true?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(d) Do while

Question 9.
Which loops execute through block of code a specified number of times?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(a) For

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 10.
Which loops execute through a block of code for each element in an array?
(a) For
(b) Foreach
(c) While
(d) Do while
Answer:
(b) Foreach

Question 11.
Match the following:

(A) For (i) Arrays
(B) For each (ii) again and again
(C) While (iii) check at the end
(D) Do while (iv) check initially

(a) (A) – (iv); (B) – (i); (C) – (iv); (D) – (iii)
(b) (A) – (ii); (B) – (iii); (C) – (i); (D) – (iv)
(c) (A) – (iv); (B) – (iii); (C) – (ii); (D) – (i)
(d) (A) – (iv); (B) – (i); (C) – (iii); (D) – (i)
Answer:
(a) (A) – (iv); (B) – (i); (C) – (iv); (D) – (iii)

Question 12.
Choose the incorrect pair: (php variable assigning)
(a) $num = 111;
(b) num = 111;
(c) $num = “111”;
(d) $num =1+2;
Answer:
(b) num = 111;

Question 13.
Choose the incorrect statement:
(a) In For loop, init counter to initialize the loop value.
(b) In For loop, Evaluated for every iteration of the loop.
(c) Increment counter, Increase the loop counter value.
(d) Do-while loop works only with arrays.
Answer:
(d) Do-while loop works only with arrays.

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 14.
Assertion (A):
Do..while loops through a block of code once, and then repeats the loop as long as the specified condition is true.
Reason (R):
The while loops execute a block of code while the specified condition is true.
(a) Both A and R are true, and R is the correct explanation for A.
(b) Both A and R are true, but R is not the correct explanation for A.
(c) A is true, But R is false.
(d) A is false, But R is true.
Answer:
(b) Both A and R are true, but R is not the correct explanation for A.

Question 15.
Pick the odd one out.
(a) For
(b) Foreach
(c) If.. else
(d) While
Answer:
(c) If., else

Question 16.
Most complicated looping structure is:
(a) While
(b) Do While
(c) For
(d) None of them
Answer:
(c) For

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 17.
Loops that iterate for fixed number of times is called:
(a) Unbounded loops
(b) Bounded loops
(c) While loops
(d) For loops
Answer:
(d) For loops

Question 18.
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
(a) For loop
(b) Foreach loop
(c) While loop
(d) All of them
Answer:
(c) While loop

Question 19.
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
(a) For loop
(b) For each loop
(c) While loop
(d) All of them
Answer:
(c) While loop

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 20.
What will be displayed in a browser when the following PHP code is executed:
<?php
for ($counter = 20; $counter < 10; $counter++)
{
echo “Welcome to Tamilnadu”;
}
echo “Counter is: Scounter”;
?>
(a) Welcome to Tamilnadu
(b) Counter is: 20
(c) Welcome to Tamilnadu Counter is: 22
(d) Welcome to Tamilnadu Welcome to Tamilnadu Counter is: 22
Answer:
(b) Counter is: 20

Question 21.
What will be displayed in a browser when the following PHP code is executed:
<?php
for ($counter = 10; $counter < 10;
$counter = $counter + 5){
echo “Hello”;
}
?>
(a) Hello Hello Hello Hello Hello
(b) Hello Hello Hello
(c) Hello
(d) None of the above
Answer:
(d) None of the above

Question 22.
PHP supports four types of looping techniques:
(a) For loop
(b) While loop
(c) Foreach loop
(d) All the above
Answer:
(d) All the above

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 23.
Consider the following code
<? php
$count=12;
do{
printf(“%d squared=%d<br/>”,
$count, pow ($count,2));
} while($count<4);
?>
What will be the output of the code?
(a) 12 squared 141
(b) 12 squared=144
(c) “12 squared= 141”
(d) Execution error
Answer:
(b) 12 squared=144

 

Question 24.
What will be the output of the following PHP code ?
<?php
for ($x =1; $x < 10; ++$x)
print “*\t”;
}
?>
(a) * * * * * * * * * *
(b) * * * * * * * * *
(c) * * * * * * * * * * *
(d) Infinite loop
Answer:
(b) * * * * * * * * *

Samacheer Kalvi TN State Board 12th Computer Applications Important Questions Chapter 7 Looping Structure

Question 25.
What will be the output of the following PHP code ?
<?php
for ($x = -1; $x < 10;—$x)
{
print $x;
}
?>
(a) 123456713910412
(b) 123456713910
(c) 1234567139104
(d) Infinite loop
Answer:
(d) Infinite loop

TN Board 12th Computer Applications Important Questions