UP Board Solutions for Class 10 Computer Science Revision Problem

UP Board Solutions for Class 10 Computer Science Revision Problem

Question 1.
Write about the different components of the computer.
Answer:
The three components of the computer are:
1. Computer Hardware: The electronic and mechanical components that make up a computer are called hardware. All computer systems contain four types of hardware components:

  • Input Devices
  • Output Devices
  • Computer Processor
  • Secondary Storage (UPBoardSolutions.com) Devices.

UP Board Solutions for Class 10 Computer Science Revision Problem
2. Computer Software: Software is a series of instructions that tell the hardware how to perform tasks. Without software, hardware is useless. Hardware needs the instructions provided by the software to process data (UPBoardSolutions.com) into information. Computer software can be divided into two parts Le., System software and Application software.

UP Board Solutions

3. Computer User: The person who communicates with a computer or uses the information it generates is called a User.
UP Board Solutions for Class 10 Computer Science Revision Problem

Question 2.
Define different data types used in ‘C’ language. (UP 2011, 12, 19)
Answer:
Data Types in ‘C’ Language: In ‘C’ language, the foil- owing Data Types are used:

  1. Numeric data type
  2. Alphanumeric data type
  3. Date and time data type
  4. Logical data type.

1. Numeric data type: Numbers of any type constitute numeric data. The numeric data can contain only the numeric characters of 0 to 9, with or without the decimal point. Some important numeric data types are int, float and double types.

Type int: The data type, which stores numeric data, is one of the basic data types in any programming language. It contains a sequence of one or more digits. For example—int sum. The variable ‘sum’ can store an integer value. It stores non-fractional values and occupies 2 bytes.

UP Board Solutions

Type float: The float data type can be used for storing values containing decimal places. The difference between int and float is only that the int type includes only whole numbers but the float type includes both whole as well (UPBoardSolutions.com) as fractional numbers. It occupies 4 bytes.

Type double: The type double is used, when the accuracy obtained using the variable of the type float is not sufficient. Variables of the type double can store twice the number of digits as can a float type. It occupies 8 bytes. The type float saves memory as it takes only half as much space as a double.

2. Alphanumeric data type: This data type can be made up of any type of characters.
Numeric = 0 to 9
Alphabetic = A to Z and a to z
Special Characters = #, $, *, etc.
These types of characters are generally enclosed within quotes “122” is considered alphanumeric data. On alphanumeric data mathematical calculations cannot be performed.
For example:
Char can store a single character
e.g., char A = ‘X’ char A[5] = “HARSH”
A char type can also store a collection of characters known as a string.

3. Date and Time data type: These are special data types for date and time values.
Date: It is a single data type that handles both date and time values.
Time: It can handle date and time values separately.

UP Board Solutions

4. Logical data type: Logical data can have only two values le., true and false.(UPBoardSolutions.com)  A single data type handles logical data. It is represented by Boolean data type.

Question 3.
WAP that reads an integer N and calculate its factorial. (UP 2004, 05)
Answer:

#include<stdio.h>
#include<conio.h>
main()
{
int n, i, fact = 1;
printf (“Enter Non-Negative value \n”);
scanf (“%d”, &n);
for (i = 1; i <= n; i ++)
{
fact = fact * i;
}
printf (“factorial of %d = %d”, n, fact);
}

Question 4.
Write a program in C language which can arrange ten numbers in ascending order. Print the output in a column. (UP 2007, 12, 19)
Or
Write a program in C language which will find out prime numbers between 1 and 100 and will print them in a column. (UP 2008)
Answer:

#include<stdio.h>
#include<conio.h>
void main ()
{
int x [10];
int * i, sum = 0;
printf (“ Enter 10 numeric values \n”);
for (i = 0; i< = 10; i + +)
{
scanf (“% d \n”, & x [i]);
sum = sum + x [1];
}
printf (“sum of the elements is % d ”, sum);
getch ();
}

Question 5.
WAP to create a file in write mode and accept data from the user, and write it on file “student.txt.”
Answer:
Program:

#include<stdio.h>
#include<conio.h>
void main ()
{
char ch;
FILE *fp = fopen (“Student.txt”, “w”);
clrscr ();
if (fp = = NULL)
{
perror (“Error in opening file”);
exit (1);
}
ch = getc (stdin);
while (ch ! = ‘*’)
{
void main ()
{
char ch;
FILE *fp = fopen (“Student.txt”, “a”);
clrscr ( );
if (fp = = NULL)
}

UP Board Solutions

Question 6.
Write a program to take the contents of a text file and copy them into another text file, character by character. (UP 2008, 16)
Answer:
Program:

#include<stdio.h>
#include<conio.h>
void main()
{
FILE * fsrc, *ftgt;
char ch;
clrscr();
fsrc = fopen(“tryl.c”,“r”);
if (fs == NULL) .
{
puts (“Cannot open source file”)
exit ();
}
ftgt = fopen (“try2.c”, “w”);
if(ft == NULL)
{
puts (“Cannot open target file”);
fclose(fs);
exit();
}
while(l)
{
ch = fgetc(fsrc);
if (ch == EOF)
break;
else
fputc(ch.ftgt);
}
fclose(fsrc);
fclose(ftgt);
}

Question 7.
What is a programming language? Write the classification of programming language. (UP 2010)
Or
Explain the following:

  1. Low-Level Language
  2. High-Level Language.

Or
What ‘Generation of programming language? Explain.(UP 2018)
Answer:
Programming Language: Language is a means of communication. Whenever we want to communicate with com- puter system, we need to do so using a language which is acceptable and understood by a computer. A language which (UPBoardSolutions.com) is used to accomplish a task and write a solution to a given problem in the form of a program is known as the programming language.
A programming language has its own set of characters, terms, instructions, Commands, syntaxes and guidelines to use these commands. A program is always written following these rules and guidelines.

UP Board Solutions

Classification of Programming Languages: Programming languages can be classified on the basis of generations of computers as follows:
UP Board Solutions for Class 10 Computer Science Revision Problem
This classification is according to the generic upgradations in the languages as per time. As time passed by, every language made significant improvements and showed some additional features.
Similar kinds of classification of programming languages can be written as following on the basis of characteristics and features of languages.
UP Board Solutions for Class 10 Computer Science Revision Problem
The above classification is in increasing order of developmental phases of languages too.
Low-Level Language: The languages that were used in the first-generation and early second generation are called as low-level languages. They directly used computer memories and other storage hardware like registers to write programs. (UPBoardSolutions.com) These languages were highly hardware dependent or machine-dependent. Programs written for one kind of hardware platform cannot be used on some other machine. Low-level languages are further divided into the following two categories :

UP Board Solutions

  1. Machine Language,
  2. Assembly Language.

1. Machine Language: As the name suggests, it used the data in writing programs which were directly understood by the computer. A computer can only accept and work on electronic signals. These electronic signals are actually a presence or absence of electronic current in a circuit. The presence of a pulse in a circuit is denoted by 1 and absence is symbolised by ‘O’. These are the only two digits which are used by a computer system and they are known as Binary digits (or abbreviated as Bits). A language that uses these two binary digits to write computer program is known as machine language.
A program written in machine language comprises instructions in the form of a series of 1’s and 0’s.
Machine language instruction is divided into two parts:

  • Opcode,
  • Operand (Address part).

OpCode: This is the first part of an instruction which tells to the computer, what is to be done or which operation is to be performed.

Operand: This is the second part of a machine language instruction which tells (UPBoardSolutions.com) the address and location of data on which operation is to be performed.
UP Board Solutions for Class 10 Computer Science Revision Problem

2. Assembly Language: Assembly language was an advancement over machine language. It is considered as a low-level language of the second generation. In this language, binary representations for various types of data are replaced by some codes. These codes are known as ‘Mnemonics’. In assembly language, there are predefined mnemonics for an opcode, operands, registers (memory locations) etc. They collectively form an assembly language program.

UP Board Solutions
High-Level Languages: Languages that were developed after machine language and assembly languages were put under the category of high-level languages.

Characteristics of High-Level Languages:

  1. High-level languages use simple English words and commonly used mathematical symbols. This feature of high-level language makes it easier for programmers to write programs in it.
  2. Programs written in high-level languages are highly readable simply by looking at a program. Any computer literate can understand the objective of the program. These languages provide better documentation facility in programs.
  3. High-level languages are procedure-oriented. It means that they concentrate (UPBoardSolutions.com) more on procedures followed to solve any given problem.
  4. Debugging of programs written in high-level languages is much easier and fast as compared to assembly language.
  5. Programs written in high-level languages are machine-independent. It means that these programs can run on a wide variety of hardware platforms by making slight modifications if needed.
  6. High-level languages are translator based languages. This translator could either be an interpreter or a compiler.

Translator Based Languages: High-level languages can also be called as translator based languages. As explained earlier, the computer only understands machine language [le., language of 0’s and 1’s) and any other form of instruction given to it needs to be translated into machine language. High-level languages generally use simple English words and phrases which must be translated into its machine-level equivalents before execution. Therefore, for every high-level language, a separate translator is essential.

Translator: It is a kind of system software which converts a program written in high level language into machine language. This machine language code is actually executed by the computer to achieve results.

UP Board Solutions
Translators can be divided into following two categories and accordingly languages are also classified as either :

  1. Interpreter based language
  2. Compiler based language.

1. Interpreter: It is a translator for high level languages. It translates every single instruction linewise and then executes it. This process continues until the end of the program. If it encounters any error, it is informed to the user immediately. Until an error is removed, the interpreter does not proceed in a forward direction. Thus, we can say that every single line of a program (also known as source program) is checked for errors, translated and executed sequentially. Basic is an interpreter based language.

2. Compiler: It is a translator for converting programs written in high level language into machine language. Its major function is the same as that of interpreter but it works differently. It scans the entire program and lists all errors at a time. Until or unless programmer rectifies all errors, program is not translated into machine code. On successful removal of all errors, object code is created. (UPBoardSolutions.com) This object code is executed to obtain the desired result. The original program before the compilation process is called a source program.
Some compiler based languages are. ‘C\ C++, JAVA, COBOL, PASCAL, FORTRAN etc.

UP Board Solutions

Fourth Generation Languages (4 GLs): These are a group of languages that made problem solving further easier than what was available in high level languages. High level languages are procedure-oriented languages, le., they focus more on the way of solving a problem. 4 GLs are a category of languages that focus more on the objective of the given problem than on the ways and (UPBoardSolutions.com) means to solve it. These languages were designed in view of managing databases (Database is a collection of similar types of records).

UP Board Solutions for Class 10 Computer Science

UP Board Solutions for Class 10 Computer Science Chapter 11 File Operation

UP Board Solutions for Class 10 Computer Science Chapter 11 File Operation

File Operation Long Answer Type Questions (8 Marks)

Question 1.
What are the data files? Write about their different types. (UP 2011, 12)
Or
Write a short note on ‘Sequential files’. (UP 2007, 15)
Or
Write short notes on ‘Random files’ and their application. (UP 2008, 09)
Or
Explain the features of Sequential file. (UP 2016)
Answer:
Data File: Data file offers a convenient method of (UPBoardSolutions.com) storing data sets, since data files can be easily read and updated by program file (‘C’ program). Example of Data file is an employee file, which is a collection of related records.
UP Board Solutions for Class 10 Computer Science Chapter 11 File Operation
Data files can be categorized in many ways. But we will categorize them only on the basis of mode of accessing. According to this condition, there are following two types of data files:

  1. Sequential data files
  2. Random data files.

UP Board Solutions

1. Sequential Data Files: The main advantage of this type of file is that records (data) are stored sequentially, one after another, on the storage media which may be a magnetic tape or a disk. These individual data items may (UPBoardSolutions.com) be different records or single entities and may comprise numerics or strings or both. If a particular data is of string type, then it must be enclosed within quotation mark.

The main disadvantage of handling the sequential file is that any particular record can be accessed sequentially. For example, if the sixtieth record from the beginning of a sequential file is to accessed, then it has to pass over the preceding fifty-nine records. Thus, it becomes more time-consuming. But if we compare it with a random data file, it is easy to create and handle.

2. Random Data Files: The basic advantage of these files is that any particular record can be accessed directly. For example, if we want to access the sixtieth record, then it can be accessed directly without passing any preceding record. It can be stored on disks only. Thus, this method is quite faster as compared to sequential data files.
For this purpose, we use function fseek. This function sets the file position indicator associated with the stream according to the values of the offset and origin. The value of origin may be one of the following:

  • 0 – the beginning of a file
  • 1 – current position
  • 2 – end of the file.

Question 2.
Discuss different file operations of ‘C’.
Answer:
File Operation: Following are the compulsory steps to operate files:

  1. Create file.
  2. Merging file i.e., combine records of two or more files into one.
  3. Adding records.
  4. Deleting records.
  5. Update records.
  6. Generate reports.

UP Board Solutions

The ‘C’ language supports different level of file processing according to the environment used.
UP Board Solutions for Class 10 Computer Science Chapter 11 File Operation
The general functions which are supported by ‘C’ in the file processing are:

  • Input functions
  • Output functions

Input functions:
-getc()
-fgetc()
-fscanf()
-fread()

Output functions:
-putc()
-fputc()
-fprintf()
-fwrite()

fopen( ) is the main function to start the above given functions. To open a file, to create a file, to restart with existing file etc., are the main functions which are performed by it.
Syntax:
file pointer = fopen(filename, mode);
i.e., FILE *fp;
fp = fopen(TRY.C”, “r”);
fp is a pointer variable, which contains the address of the structure FILE which has been defined in the header file “stdio.h”.
fopen() will open a file TRY.C’ in ‘read* mode, which tells the (UPBoardSolutions.com) C compiler that we would be reading the contents of the file, “r” is a string and not a character. Hence, fopen() performs three important tasks when you open the file in “r” mode:

UP Board Solutions

  • It searches on the disk the file to be opened.
  • If the file is present, it loads that file from the disk into memory.
    If the file is absent, fopen() returns a NULL. This function opens one file at a time.
  • It sets up a character pointer which points to the first character of the memory where the file has been modified.

Question 3.
Write about different modes in which a file can be opened.
Answer:
File Opening Modes: The tasks performed by fopen() when a file is opened in each of these modes are also mentioned.
Character Used
for Mode → Meaning
w → Create for write
r → Open for reading
a → Open for append/create a new file
w+ → Create for read/write
r+ → Open for read/write
a+ → Open for read/write/create new file.

Question 4.
WAP to copy the contents of one file to another?
Answer:
Program:

UP Board Solutions

#include<stdio.h>
#include<conio.h>
void main()
{
FILE *fsrc, *ftgt;
char ch;
clrscr();
fsrc = fopen(“tiyl.c”, “r”);
if (fs = = NULL)
{
puts (“Cannot open source file”);
exit();
}
ftgt = fopen(“tiy2.c”, “w”);
if (ft = = NULL)
{
puts (“Cannot open target file”);
fclose(fs);
exit();
} .
while(1)
{ . ch = fgetc(fsrc);
if (ch = = EOF)
break;
else
fputc(ch, ftgt);
}
fclose(fsrc);
fclose(ftgt);
}

Question 5.
Explain fread () and fwrite () functions.
Answer:
fread( ): This function reads a specified number of equal-sized (UPBoardSolutions.com) data items from an input stream into a block, fread returns the number of items (not bytes) actually read on success.
Syntax:
fread (& name_of_structure, size_of_(structure name), l, file pointer);
e.g.,

struct employee
{
char nm[20]; /* 20 bytes */
int age; /* 2 bytes */
};
struct employee Emp;
fread (&Emp, size of (Emp), 1, fp);

Here, the fread function can read 22 bytes of information from the file pointed by file pointer fp.
fwrite( ): This function appends a specified number of equal-sized data items to an output file.
Syntax:
fwrite (& struct—name, size of (struct), 1, fp);
e.g.,

UP Board Solutions

street address
{
char city [30]; /* 30 bytes */
long in pin; /* 2 bytes */
char country [20]; /* 20 bytes */
};
struct address add;
FILE *fp;
fwrite (& add, size of (add), 1, fp);

Question 6.
Describe the main features of printf and getchar function. (UP 2014)
Answer:
printf ( ) → This function writes formatted data to screen. This function allows to supply the input in a fixed format and to obtain the output in the specified form. The printf () function interprets the contents (UPBoardSolutions.com) of the format string.
Syntax:
Printf (“formatted string”, variables); if needed
Example 1.
Printf (“Average = % d percentage = % of’, avg. per);
Here the %d and %f are conversion characters.
They tell printf () to print the value of avg as an integer and per as afloat.

getchar ( ): Using this function any single ASCII character can be inputted in any char type of a variable. This function is available in stdio.h header file so it must be included in the program, in the beginning, using # include declarative.
For example,

UP Board Solutions

#include<stdio.h>
#include<conio.h>
void main ()
{
char x;
x = getchar();
cout << “you entered” << x;
}

File Operation Short Answer Type Questions (4 Marks)

Question 1.
What is stdin and what is stdout?
Answer:
In ‘C’ language, whatever values are given or displayed on a monitor, it can be file handling first stored in a buffer area. The two buffer areas used for this are:

  • stdin: It stands for keyboard buffer as it stores the information sent by the keyboard.
  • stdout: It stands for standard output buffer, le., monitor of the computer.

UP Board Solutions

Question 2.
Differentiate fprintf() and fscanf(). (UP 2016)
Answer:
fprintf( ): This function sends formatted output to a stream. It accepts a series of arguments, apply to each argument a format specifier contained in the format string * format. This function applies the first format specifier to the first argument, the second specifier to the second argument… till the end of the format.

fscanf(): This function is similar to scanf() function. It scans a series of input fields one character at a time. Store the formatted input at an address passed as an argument following * format. This function might stop scanning (UPBoardSolutions.com) a particular field before it reaches the normal end-of-field (while space) character, or it might terminate entirely.

Question 3.
What is reading files? (UP 2008)
Answer:
Reading from files: To read from a file, ‘C’ provides the following functions:
To read data from file, it should exist.
fscanf (): This function is used to read data from a file. It is very similar to scanf () function. It scans a series of input fields (one at a time).
Syntax:
fscanf () file * stream, “format specifiers”, “Variables”).

UP Board Solutions

Question 4.
What is the closing of the file?
Answer:
Closing Files: During a write to a file, the data written is not put on the disk immediately. It is stored in a buffer. When the buffer is full, all its contents are actually written to the disk. The process of emptying the buffer (UPBoardSolutions.com) by writing its contents to disk is called flushing the buffer. Losing the file flushes the buffer and releases the space taken by the FILE structure which is returned by fopen. For this fclose () function is used.
Syntax:
fclose (File * stream (s);

File Operation Very Short Answer Type Questions (2 Marks)

Question 1.
In which type of file, accessing a particular record is faster?
Answer:
Random data file.

UP Board Solutions

Question 2.
Which statement is used to close a file?
Answer:
fclose() statement.

Question 3.
When data is to be written on a file, in which mode it should be opened? (UP 2016)
Answer:
‘w’ mode (for writing).

Question 4.
Which statement is used to read the data from a file?
Answer:
fread() statement is used to read the data from a file.

Question 5.
What do you know about ffiush() statement?
Answer:
If the given stream has buffered output, fflush writes the output for (UPBoardSolutions.com) a stream to the associated file.

UP Board Solutions

Question 6.
Which is function prints error message corresponding to the last Library routine that produced the error?
Answer:
perror ().

Question 7.
Which file pointer position of seeking function seeks from the beginning?
Answer:
SEEK SET.

File Operation Objective Type Questions (1 Marks)

There are four alternative answers for each part of the questions. Select the correct one and write in your answer book:

Question 1.
The last location of a file is:
(a) EOF
(b) END
(c) LAST
(d) CLOSE.
Answer:
(a) EOF

Question 2.
Which function is used to close a file? (UP 2015)
(a) CLOSE
(b) END
(c) EOF
(d) None of these.
Answer:
(b) END

UP Board Solutions

Question 3.
Which function is used to read a line from file:
(a) gets ()
(b) fgets ()
(c) readline ()
(d) gets ().
Answer:
(b) fgets ()

Question 4.
Which function sets the file pointer associated with a stream to a new position:
(a) fseek ()
(b) perror
(c) rename
(d) rewind.
Answer:
(a) fseek ()

UP Board Solutions for Class 10 Computer Science

UP Board Solutions for Class 10 Computer Science Chapter 10 String Data Manipulation

UP Board Solutions for Class 10 Computer Science Chapter 10 String Data Manipulation

String Data Manipulation Long Answer Type Questions (8 Marks)

Question 1.
What do you know about string function? Explain three-string functions with suitable examples.
Or
What is a string? Explain two string functions of your choice. (UP 2007, 08, 11, 12, 13)
Answer:
String Functions. String functions are those functions which (UPBoardSolutions.com) handle string data. ‘C’ language uses a large set of useful string handling library functions. Three string functions are:

1. STRCPY( ): This function copies the contents of one string into another. The base addresses of the source and target strings should be supplied to this function.
Example:

UP Board Solutions

void main()
{
char src[ ] = “Rajeev”;
char tgt[20];
strcpy (tgt, src);
printf (“Source string = %s”, src);
printf (“Target string = %s”, tgt);
}
Output:
Source string = Rajeev
Target string = Rajeev

2. STRLWR(): This function converts upper case (A to Z) string to all lower case (a to z).
Example:

void main()
{
char STR[ ] = “RAJEEV”;
printf (“Upper case = %s”, STR);
strlwr(STR);
printf(“lower case = %s”, STR);
}
Output:
Upper case = RAJEEV
Lower case = rajeev

3. STRUPR( ): This function converts lower case (a to z) string to upper case (A to Z) string:
Example:

UP Board Solutions

void main()
{
char str[ ] = “rajeev”;
prinft (“lower case = %S”, str);
strupr (str);
printf (“upper case = %S”, str);
}

Output:
Lower case = rajeev
Upper case = RAJEEV

Question 2.
Explain GETS() and PUTS() function with example.
Answer:
GETS( ): In ‘C’ scanf( ) is not capable of receiving a multiword string, therefore, names such as “Rajeev Sharma” would be unacceptable. The function collects a string of characters terminated by a new line, the (UPBoardSolutions.com) standard input.
PUTS(): The function puts() can display only one string at a time. Puts copies the null-terminated string to the standard output. Also on display a string, unlike printf(), puts() places the cursor on the next line.
Example:

void main()
{
char name [20];
printf (“enter your name");
gets (name);
puts (“Good Morning !”);
puts (name);
}

Output:
Enter your name, Rajeev Sharma
Good Morning
Rajeev Sharma.

UP Board Solutions

Question 3.
What is concatenation? Explain with example.
Or
Explain the mechanism of Concatenation of a new word in a string. (UP 2017)
Answer:
Concatenation: Concatenation means joining of two different strings to form one string. In ‘C’, streat function is used to do concatenation.
STRCAT(): This function appends or concatenates the source string (UPBoardSolutions.com) at the end of the target string. For example, “Rajeev” and “Sharma” on concatenation would result in a string “Rajeev Sharma”. The length of the resulting string is strlen(dest) + strlen(src).
Example:

void main()
{
char src[ ] = “Rajeev”;
char tgt[ ] = “Sharma”;
strcat (tgt, src);
printf (“\n source string = % s”, src);
printf (“\n target string = % s”, tgt);
}

Output:
source string = Rajeev
target string = Sharma Rajeev.

Question 4.
WAP to check for palindrome.
Answer:
Program:

UP Board Solutions

#include<stdio.h>
#include<conio.h>
void main()
{
char str[20);
char temp[20];
puts (“Enter any word”);
gets (str);
strcpy (temp, str);
strrev (str);
if (strcmp (str, temp) == 0)
{
printf (“it is a palindrome”);
}
else
{
printf (“it is not a palindrome”);
}
}

Question 5.
WAP to change a string from lower case to upper case.
Answer:
Program:

#include<stdio.h>
#include<conio.h>
#include void main()
{
char str [20];
puts (“enter a string in lower case”);
gets (str);
strupr (str);
printf (“upper case = %S”, str);
}

String Data Manipulation Short Answer Type Questions (4 Marks)

UP Board Solutions

Question 1.
What is strlen in ‘C’ language? (UP 2011)
Answer:
STRLEN( ): This function calculates the length of a string. It returns (UPBoardSolutions.com) the number of characters in a string, not counting the terminating null character. Its syntax is illustrated in the following program:

void main()
{
char N[ ] = “This is a book”;
int len;
len = strlen(N);
printf (“The length of the string is %d”, len);
}

Question 2.
What are the strings? (UP 2008, 18)
Answer:
Strings: Like a group of integers can be stored in an integer array, similarly a group of characters can be stored in a character array. Strings are single-dimensional arrays of type char. In ‘C’, a string is terminated by null character or ‘\0’. String constants are written in double-quotes.
For Example: **char name [ ] = {‘I’, ‘N’, ‘D’, ‘T’, ‘A’ , ‘\0’};
Each character in the array occupies one byte of memory and the last character is always ‘\0’.’\0′ is called null character. Note that ‘\0’ and ‘0’ are not the same. ASCII value of ‘\0’ is 0, whereas the ASCII value of ‘O’ is 48. Many string functions such as string length, string compare, string copy, string concatenate etc. are most commonly used functions.

UP Board Solutions

Question 3.
What is the purpose of strcmp function?
Answer:
Strcmp function. This function compares two strings to find out whether they are the same or different. The string comparison starts with the first character in each string and continues with subsequent characters until the (UPBoardSolutions.com) corresponding characters differ or until the end of the strings is reached. If the two strings are identical, strcmp () returns a value zero. If they are not, it returns the numeric difference between the ASCII values of the non-matching characters.
Example:

void main ()
{
char str 1 [ ] = “Rajeev”;
char str 2 [ ] = “Sharma”;
int i, j, k;
i = strcmp(str l, “Rajeev”);
j = strcmp (str l, str 2);
k = strcmp (str l, “Rajeev Sharma”);
printf (“\n % d %d % d”, i, j, k);
}

Output:
0 – 1 – 32

String Data Manipulation Very Short Answer Type Questions (2 Marks)

Question 1.
Which function is used to find the length of a string?
Answer:
strlen() function.

Question 2.
What is the name of the function which is used to copy a string into another?
Answer:
strcpy () function.

Question 3.
In ‘C’ language a string is terminated with what?
Answer:
In ‘C’ language a string is terminated by (UPBoardSolutions.com) null character or ‘10’.

UP Board Solutions

Question 4.
What is the ASCII value of ‘10’ and ‘0’?
Answer:
ASCII value of ‘10’ is 0. ASCII value of ‘0’ is 48.

Question 5.
The process of appending one string at the end of smother string is known as ………..
Answer:
Concatenation.

Question 6.
Function to check the time of the day. (UP 2012)
Answer:
time ( ).

String Data Manipulation Objective Type Questions (1 Mark)

There are four alternative answers for each part of the questions. Select the correct one and write in your answer book:

Question 1.
A variable name must start with:
(a) An alphabet
(b) A number
(c) $ symbol
(d) # sign
Answer:
(a) An alphabet

Question 2.
% is used for:
(a) String data type
(b) Character data type
(c) Numeric data type
(d) Float data type.
Answer:
(a) String data type

UP Board Solutions

Question 3.
Which header file is used for sesmf () and print ()?
(a) stdio.h
(b) conio.h
(d) math.h
(d) Both (a) and (b).
Answer:
(b) conio.h

Question 4.
Which of the following is not a looping statement?
(a) for
(b) if
(c) while
(d) do-while.
Answer:
(b) if

UP Board Solutions for Class 10 Computer Science

UP Board Solutions for Class 10 Computer Science Chapter 9 Functions and Sub-Routines

UP Board Solutions for Class 10 Computer Science Chapter 9 Functions and Sub-Routines

Functions and Sub-Routines Long Answer Type Questions (8 Marks)

Question 1.
What do you mean by function in ‘C’? (UP 2004, 08, 09, 10, 19)
Or
What is the library function in ‘C’? Explain. (UP 2010, 12, 18)
Answer:
Introduction: Sometimes, to perform a particular task in a program, you may have to write another program which may be a very cumbersome process. Functions are very useful to read, write, debug and modify (UPBoardSolutions.com) complex programs. They can also be easily incorporated in the main program. In ‘C’ language, main() itself is a function that means the main function is invoking the other functions to perform various tasks.
There are two types of functions:

UP Board Solutions

  1. Built-in functions/Library Function.
  2. User-defined functions.

1. Built-in Functions/Library Functions: These are the pre-defined routines that are included as an integral part of the language. Each function is accessed simply by stating its name, followed by whatever information must be supplied to the function, enclosed in parentheses (A numeric quantity or a string that is passed to a function in this manner is called an argument). Library functions are also called standard functions or elementary functions. These functions provide a quick and easy way to evaluate many mathematical (UPBoardSolutions.com) functions and to carry out certain logical operations.
There are several library functions in ‘C’ Language. Basic Library functions are of two types:

  • String Functions: String functions operate on strings, e.g., strlen (), strrev()
  • Numeric Functions: Numeric functions operate on numeric values, e.g., ABS(), EXP(), SIN(), cos().

2. User-defined Functions: This feature allows you to define functions within a program, which you can call whenever you need them. While running the program (FUNC) statement can save space as well time, as a complex calculation can be defined with a short name and called up by its name where needed.

UP Board Solutions

Question 2.
What are user-defined functions? Explain with example. (UP 2005, 13, 16)
Answer:
User-defined Functions: This feature allows you to define functions within a program, which you can call whenever you need them. While running the program (FUNC) statement can save space as well as time, as a complex calculation can be defined with a short name and called up by its name where needed.
Defining a Function

main()
{
printf (“I am in function main \n”);
India();
printf (“I am finally back in function main \n”);
}
India()
{
printf (“I am in India \n”);
Delhi();
printf (“I am back in India \n”);
1
Delhi();
{
printf (“I am in Delhi \n”);
Bombay();
}
Bombay()
{
printf (“I am in Bombay”);
}

UP Board Solutions

Output:
I am in function main
I am in India
I am in Delhi
I am in Bombay
I am back in India
I am finally back in function main

Question 3.
WAP to demonstrate a function declaration, function calling and function definition.
Answer:
Program:

#include<stdio.h>
void main (void)
{
void display (void); /* function declaration */ display (); /* function calling */
}
void display (void)/* function definition */
{
printf (“this is a test program \n”);
printf (“for demonstrating a function call \n”);
printf (“in C \n”);
}

Output:
this is a test program for demonstrating a function call in C

Question 4.
Explain Return statement with example.
Answer:
Return Statement: The keyword return is used to terminate function and return a value to its caller. The return statement may also be used to exit a function without returning a value. The return statement may or may (UPBoardSolutions.com) not include an expression.
Example Program:

UP Board Solutions

# include<stdio.h>
void main (void)
{
float max (float, float, float);
float a, b, c maximum;
printf (“Enter three numbers\n”);
scanf (“%d %d %d”, &a, &b &c);
maximum = max (a, b, c);
printf(“maximum = %d, maximum);
}
float max (float x, float y, float z)
}
if (x > y)
{
if (x > z)
return (x);
}
else
{
if (y > z)
return (z);
else
return (z);
}
}

Output:
Enter three numbers
2 4 8
maximum = 8

Functions and Sub-Routines Short Answer Type Questions (4 Marks)

Question 1.
What is the status of ‘C’ language? Why is ‘C’ language so popular in the software world? Explain. (UP 2011, 15, 18, 19)
Or
Why is ‘C’ a very popular language? Explain with suitable example. (UP 2017)
Answer:
Programming Language is a set of instructions and keywords which help a user to communicate with the computer. The ‘C’ programming language was developed by Dennis Ritchie in Bell Telephone Laboratories, in the (UPBoardSolutions.com) early 1970s. Ken Thompson and his team supported him in developing this language. In the late seventies, ‘C’ began to replace the more familiar languages of that time like PL/I, ALGOL, etc. In less than a decade of its introduction, ‘C’ has become a language of choice for software professionals because it is reliable, simple and easy to use. The UNIX operating system was written in ‘C’ language.

UP Board Solutions

One of the most interesting things about the ‘C’ language is that its compiler is written in ‘C’. ‘C’ language is considered as a middle-level language since it was designed to have both a relatively good programming efficiency and a relatively good machine efficiency. It is a bridge between low level and high-level languages.

  • ‘C’ language possesses features of both low level and high-level languages.
  • It provides the facility to do programming with easy approaches.
  • It provides the facility to do programming at register level which leads to fast processing.
  • It consists of simple English like commands, which are easy to understand.
  • The programs written in ‘C’ language are 100 per cent efficient and are also machine-independent and portable.
  • A ‘C’ program is easier to write and does not vary much from computer to computer.

Question 2.
Define ABS function with example.
Answer:
ABS(X): This function gives the absolute value of X. The absolute value (UPBoardSolutions.com) of a constant is always independent of its sign le., it is always positive.
For example:

UP Board Solutions

#include<stdio.h>
#include<conio.h>
void main()
{
int a = -20, b = -20.23, c = 18.5
printf (“%d %d %d”, abs(a), abs(b), abs(c));}

Output: 20 20.23 18.5

Question 3.
Define SQR function with example.
Answer:
SQR(X): function returns the square root of its argument which should never be negative.
For example:

#include<stdio.h>
#include<conio.h>
void main()
{
int a = 4, b;
b = sqr(a);
printf (“%d”, b);
}

Output: 2

UP Board Solutions

Functions and Sub-Routines Very Short Answer Type Questions (2 Marks)

Question 1.
What is argument?
Answer:
The value we pass in a function at the time of its calling is known as an argument.

Question 2.
What is Numeric function? (UP 2016)
Answer:
The numeric function works on numeric values.

Question 3.
What is the use of EXP function?
Answer:
EXP function is used to return the exponential value of the argument.

Question 4.
What is the other name of the pre-defined function?
Answer:
The pre-defined function is also known as built-in function.

UP Board Solutions

Question 5.
Who developed ‘C’ language?
Answer:
Dennis Ritchie and Ken Thompson.

Question 6.
A loop within a loop is known as ……..
Answer:
Nested loop.

Functions and Sub-Routines Objective Type Questions (1 Marks)

There are four alternative answers for each part of the questions. Select (UPBoardSolutions.com) the correct one and write in your answer book:

Question 1.
Functions which are compiled into object modules are known as (UP 2012)
(a) Library functions
(b) Recursive functions
(c) User-defined functions
(d) None of these.
Answer:
(a) Library functions

UP Board Solutions

Question 2.
The default return type of a user-defined function is:
(a) void
(b) float
(c) char
(d) int
Answer:
(a) void

Question 3.
A user-defined function can be called:
(a) One time
(b) Two times
(c) Three times
(d) More than three times.
Answer:
(d) More than three times.

Question 4.
Language used to design web pages is: (UP 2014)
(a) C++
(b) BASIC
(c) HTML
(d) JAVA.
Answer:
(c) HTML

Question 5.
The value passed at the time of calling a function is known as:
(a) Variables
(b) Constants
(c) Arguments
(d) None of these.
Answer:
(c) Arguments

UP Board Solutions

Question 6.
Which of the following is short-cut for ‘Save’ operation?
(a) Control + P
(b) Control + S
(c) Control + N
(d) Control + F
Answer:
(b) Control + S

UP Board Solutions for Class 10 Computer Science

UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

Final Accounts Objective Type Questions (1 Mark)

Question 1.
……… is not a fixed asset. (UP 2014)
(a) Land and Building
(b) Stock
(c) Furniture and Fixtures
(d) Plant and Machinery.
Answer:
(b) Stock

Question 2.
…………. is shown in Trading Account. (UP 2014)
(a) Gas and Fuel
(b) Salary
(c) Commission
(d) Rent.
Answer:
(a) Gas and Fuel

UP Board Solutions

Question 3.
Profit and Loss Account is prepared by: (UP 2014)
(a) Partnership Firm
(b) Sole Trader
(c) Company
(d) All of these.
Answer:
(d) All of these.

UP Board Solutions

Question 4.
……….. is not current liability. (UP 2013)
(a) Creditors
(b) Bills Payable
(c) Bank Overdraft
(d) Capital.
Answer:
(d) Capital.

Question 5.
……….. is current Asset. (UP 2012, 16)
(a) Cash
(b) Furniture
(c) Machinery
(d) None of these.
Answer:
(a) Cash

Question 6.
Net Profit is shown in the capital by: (UP 2012)
(a) Adding
(b) Deducting
(c) Adding or Deducting
(d) All of these are correct.
Answer:
(a) Adding

UP Board Solutions

Question 7.
………. is not shown in Trading Account. (UP 2013, 16)
(a) Carriage inward
(b) Carriage outward
(c) Wages
(d) Factory Light
Answer:
(b) Carriage outward

Question 8.
………. is not an account: (UP 2015)
(a) Trading Account
(b) Profit and Loss Account
(c) Balance Sheet
(d) All of these.
Answer:
(d) All of these.

Question 9.
………… is shown in the balance sheet: (UP 2015, 17)
(a) Salary
(b) Rent and Tax
(c) Repairs
(d) Cash.
Answer:
(d) Cash.

Question 10.
Trade expenses are written in: (UP 2015, 18)
(a) Trading Account
(c) Balance Sheet
(b) Profit and Loss Account
(d) None of these.
Answer:
(c) Balance Sheet

UP Board Solutions

Question 11.
Which of the following is Fixed Asset Account? (UP 2019)
(a) Capital
(b) Bills payable
(c) Debtors
(d) Plant and Machinery.
Answer:
(d) Plant and Machinery.

Final Accounts Definite Answer Type Questions (1 Mark)

Question 1.
What kind of Assets have no real value?
Answer:
Fictitious.

Question 2.
What kind of Assets come into existence on the happening of certain event?
Answer:
Contingent.

Question 3.
What term is used for the process or manner of disclosing Assets and Liabilities in Balance Sheet?
Answer:
Marshalling.

Question 4.
Write the name of the book in which miscellanceous expenses are recorded. (UP 2014, 18)
Answer:
Petty Cash Book.

Question 5.
What kind of expenditure is done for the acquisition of Assets with a view to increase productivity?
Answer:
Capital.

UP Board Solutions

Final Accounts Very Short Answer Type Questions (2 Marks)

Question 1.
What is meant by Gross Profit?
Answer:
Gross Profit: The excess of the selling price of the sold goods over their purchase price including all direct expenses is called Gross Profit.

Question 2.
What are Current Assets?
Answer:
Current Assets: Current Assets are assets which are required by the business for the purpose of resale, as stock in trade or such assets which are constantly circulating and arise out of usual (UPBoardSolutions.com) business dealings.

Question 3.
What is meant by Fixed Assets? Mention any two. (UP 2013)
Answer:
Fixed Assets: Fixed assets are those assets which are held by way of possession and not for purpose of resale. They are permanent in nature and the business is carried on with their help.
Example: Land, Building etc.

UP Board Solutions

Question 4.
Where would you show adjustment relating to Accrued Income? (UP 2019)
Answer:
Assets side of Balance sheet and credit side of P & L a/c.

Question 5.
Which account is prepared for knowing the net profit? (UP 2019)
Answer:
Profit and Loss Account.

Final Accounts Short Answer Type Questions (4 Marks)

Question 1.
What do you understand by Final Account? (UP 2014, 16)
Answer:
Final Account is the final process of accounting. The final account is prepared to show the final result of the company in a specific period. Trading, Profit and Loss account and Balance Sheet are included (UPBoardSolutions.com) in the final account.

UP Board Solutions

Question 2.
Write the characteristics of fixed assets. (UP 2014)
Answer:

  1. Fixed assets are held by way of possession and not for the purpose of resale.
  2. Fixed assets are permanent in nature and the business is carried on with their help.

Question 3.
Give differences between Trial Balance and Balance Sheet.
Answer:
Difference Between Trial Balance and Balance Sheet.

Trial Balance Balance Sheet
1. Trial Balance Check only arithmetical accuracy of accounts. 1. Balance Sheet is prepared to find out the financial position of the business.
2. Trial Balance is prepared before the preparation of Final Accounts. 2. Balance Sheet is the last content of the Final Accounts.
3. It is not compulsory to prepare the Trial Balance. 3. It is compulsory to prepare the Balance Sheet.

Final Accounts Long Answer Type Questions (8 Marks)

Question 1.
Keeping in mind adjustments for outstanding salary prepaid tax, accrued income, interest on capital @ 8% and 10% depreciation on plant and furniture, prepare Trading and Profit & Loss Account (UPBoardSolutions.com) and Balance Sheet of Sagar Brothers with imaginary figures:
Answer:
UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

UP Board Solutions
UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

Question 2.
What is the manufacturing account? How does it differ from a Trading Account? Give an example of a manufacturing account using imaginary figures. (UP 2004)
Answer:
Manufacturing Account: Manufacturing Account is prepared by those undertakings, which undertake or engaged in the production activities. Manufacturing Account is prepared for knowing the cost of goods produced by the concern which further helps in fixing the selling price of the goods produced. A manufacturer purchases the raw materials for selling them by transforming them into finished goods. For this, several expenses are to be incurred by him like fuel, power, electricity, water, coal etc.

Fuel and Power: When fuel and power are used for undertaking the production or running the machinery, they are debited to Manufacturing or Trading Account as the case may be. The light used for lighting purpose does not mean power. Power should not be understood as lighting which is discussed below:

Lighting: The electricity which is used for making the Lighting in the factory building is shown at the debit side or Manufacturing or Trading Account. If the same meter of electricity is used for Lighting the factory and (UPBoardSolutions.com) office building then the expenses shoukPbe apportioned appropriately. The expenses of Lighting for office building should be charged to Profit and Loss Account.

Stock: Stock of raw materials, semi-finished goods and finished goods are the three kinds of opening or closing stock remaining with the manufacturer.
The manufacturer or producer can prepare his Trading Account in three ways:

  • To prepare Manufacturing and Trading Account separately in such a way as to transfer the balance of Manufacturing Account to Trading Account.
  • All types of stock, purchases sales and direct expenses are to be recorded in one account, known as Trading Account.
  • After putting down the heading of Trading Account, its upper portion is prepared (UPBoardSolutions.com) as Manufacturing Account and lower portion as Trading Account.

UP Board Solutions

Example.of a Manufacturing Account:
UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

Question 3.
What are the objects of preparing Trading Account? How does it differ from Profit and Loss Account? Prepare Trading Account using imaginary figures. (UP 2004)
Or
What is a Trading Account? Distinguish between the Trading Account and Profit and Loss Account. Give a specimen of Trading Account. (UP 2008)
Answer:
Trading Account: The Trading Account is an account which shows the result of the buying and selling of goods. It contains in a summarized form of all the transactions occurred during a trading period which has a direct relation to the goods dealt in by the business. Trading Account is a part of the Profit and Loss Account and is made at the end of the financial year.

Gross Profit and Gross Loss: The excess of the selling price of the sold goods over their purchase price including all direct expenses is called Gross Profit. If the cost of the purchase price including all direct expenses (UPBoardSolutions.com) exceeds the selling price of the goods sold, it is called Gross Loss. Gross Profit is transferred to the credit side and Gross Loss is transferred to the debit side of Profit and Loss Account.

To Know the Cost of Goods Sold: To know the Gross Profit or Gross Loss the calculation of the actual cost of goods sold is very necessary.
The total of the following gives the cost of goods:

  • Purchase price of the goods after deducting purchase returns.
  • Carriage paid on purchases like Railway Freight, Carriage etc. These expenses are termed as Carriage Inward.
  • Payment of toll tax or any other taxes in bringing the goods.
  • Expenses for clearing charges made for goods.
  • Wages in connection with goods.
  • Manufacturing expenses, like fuel, power, coal etc.

UP Board Solutions

The amount of Sales return is deducted from the number of Sales and then the value of a Closing stock is added to it. From the figure so obtained the total of above expenses including opening stock is deducted and the balance amount is the Gross Profit.
Difference between the Trading Account and Profit and Loss (UPBoardSolutions.com) Account:
Following are the points of difference between Trading and Profit and Loss Account:

Trading Account Profit and Loss Account
1. Trading Account is prepared for ascertaining the Gross Profit. 1. Profit and Loss Account is prepared for ascertaining the Net Profit.
2. Direct expenses are transferred to Trading Account. 2. Indirect expenses are transferred to Profit and Loss Account.
3. The balance i.e., Gross Profit or Loss is transferred to Profit and Loss Account. 3. The balance i.e., Net Profit or Loss is transferred to Capital Account or Balance Sheet.
4. Trading Account is prepared before the Profit and Loss Account. 4. Profit and Loss Account is prepared after the Trading Account.
5. Trading Account is a part of the Profit and Loss Account. 5. Profit and Loss Account is a principal Account.

Specimen of Trading Account:
UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

Question 4.
Why is the Balance Sheet prepared? What is the difference between the Trial Balance and the Balance Sheet? (UP 2002, 16)
Or
What do you understand by Balance Sheet? (UP 2015, 17)
Answer:
The information revealed by the Trading and Profit and Loss Account is no doubt very useful to the owner of a business, as it enables him to know the Gross and Net Profit or Loss. The Assets and Liabilities of a business change from day to day, as a result of business transactions. He also wants to find out the correct financial position of his business until the end of each (UPBoardSolutions.com) financial period. In the first place, he would like to know whether net profit or loss disclosed by the Profit and Loss Account is correct and if so, then whether the impact of the same has been correctly shown in the Capital Account or not. The businessman is always concerned about his true position of Assets and Liabilities. In order, therefore, to obtain this information at the end of the trading period, he has to set out his Assets and Liabilities as on that date in the shape of a statement and this statement is called the Balance Sheet.

Definition of Balance Sheet:
A Balance Sheet may be defined as a statement prepared with a view to determining the exact financial position of a business on a certain fixed date.
The Balance Sheet is prepared from the Trial Balance after all the balances of Nominal Account are transferred to the Trading, Profit and Loss Account and the corresponding accounts in the ledger are closed. The balances now left in the Trial Balance and accounts remaining open in the ledger represent either Personal Accounts or Real Accounts. In other words, they represent either Assets or Liabilities existing at the date of the financial closing.

UP Board Solutions

All such Assets and Liabilities are shown in the Balance Sheet in a classified form. On the right-hand side are shown the various Assets or possessions of the business, and on the left-hand side, the various Liabilities, i.e., the amount which the business owes to others. The excess of Assets over Liabilities represent the Capital. The figure of the capital should tally with the balance of the (UPBoardSolutions.com) Capital Account in the ledger after adjustment of the Profit and Loss in the Capital Account.
Difference between the Trial Balance and the Balance Sheet:

Trial Balance Balance Sheet
1. Trial Balance tests the arithmetical accuracy of accounts. 1. Balance Sheet is prepared to find out the financial position of the business.
2. Trial Balance includes the Personal, Real and the Nominal accounts. 2. Balance Sheet contains only Personal and Real accounts.
3. The Balances of the accounts in the Trial Balance are shown in the same order as they appear in the ledger book. 3. The Balances in the Balance Sheet are shown either in order of liquidity or in order of permanence.
4. Trial Balance is prepared before the preparation of final accounts. 4. Balance Sheet is the last content of the final accounts.
5. Closing stock is not included in the Trial Balance. 5. It is necessary to show the closing stock in the Balance Sheet.
6. The terms ‘Dr.’ and ‘Cr.’ are used in the Trial Balance. 6. The terms used in the Balance Sheet are ‘Assets’ and ‘Liabilities’.
7. It is not compulsory to prepare the Trial Balance. 7. It is compulsory to prepare the Balance Sheet.

Specimen of Balance Sheet:
Balance Sheet. (as on …..)

Particulars Amount (₹) Particulars Amount (₹)
Bank Overdraft
Bills Payable
Loan
Sundry Creditors
Capital
Add: Net Profit
……….
………..
Less: Drawings
……………….
………………
………..
……….
……….
………..
………..
……..………..
Cash in Hand
Cash at Bank
Investments
Bills Receivable
Sundry Debtors
Closing Stock
Furniture
Machinery and Plant
Land and Building
Motor Car
Tools
Goodwill
………..
………..
……….
……….
………..
………….
………..
……….
……….
……….
………
……….

UP Board Solutions

Question 5.
What do you mean by Balance Sheet? State classification of assets and liabilities. (UP 2002, 16)
Answer:
Manufacturing Account: Manufacturing Account is prepared by those undertakings, which undertake or engaged in the production activities. Manufacturing Account is prepared for knowing the cost of goods produced by the concern which further helps in fixing the selling price of the goods produced. A manufacturer purchases the raw materials for selling them by transforming them into finished goods. For this, several expenses are to be incurred by him like fuel, power, electricity, water, coal etc.

Classification of Assets and Liabilities:
1. Fixed Assets: Fixed Assets are those assets which are held by way of possession (UPBoardSolutions.com) and not for the purpose of resale. They are permanent in nature and it is by their help that the business is carried on.
Example: Land, Building, Plant Machinery, Tools, Furniture, Fittings, etc.

2. Floating Assets: Floating assets are assets which are required by the business for the purpose of resales, such as stock in trade or such assets which are constantly circulating and arise out of usual business dealings. They are held temporarily for subsequent conversion into money.
Example: Debtors, Stock, etc.

3. Wasting Assets: The assets which lose their value in a diminishing manner are known as Wasting Assets.
Example: Patent of land, Copyright, etc.

4. Liquid Assets: Liquid Assets are assets which can be immediately converted into cash.
Example: Bills Receivable, Cash at Bank, etc.

5. Nominal Assets: Nominal Assets are imaginary assets which do not have any shape or volume. They are also called Fictitious Assets.
Example: Goodwill, Prepaid Expenses, Accrued Income.

Classification of Liabilities:
1. Fixed Liabilities: Liabilities which are not to be paid in the near future but are payable after a long period is known as Fixed Liabilities. There are some liabilities which are paid after the liquidation of a business.
Example: Capital, long term loan, etc.

2. Current Liabilities: Liabilities which are to be paid in the near future are known as Current Liabilities.
Example: Creditors, Bank Overdraft, Bank Loan, Bills Payable, etc.

3. Contingent Liabilities: Contingent Liabilities are those liabilities which are paid on happening or non-happening of some event.
Example: Suppose there is a matter under consideration in a court of law regarding less payment of taxes. If the decision of the court is favourable then no payment will be made and if the decision is unfavourable then the amount decided by the court will have to be paid.

UP Board Solutions

Question 6.
Prepare Profit and Loss Account of M/s Keshav and Sons, for the year ending on 31st December 2010.
From the following information:
Cash in Hand Rs. 1,000; Cash at Bank Rs. 5,000; Machinery Rs. 21,000; Debtors Rs. 45,000 ; Discount (Cr.) Rs. 1,750 ; Repairs Rs. 1,200 ; Bad Debts Rs. 650 ; Advertising expenses Rs. 4,500; Insurance Premium Rs. 4,200; Capital Rs. 45,000; Gross Profit Rs. 81,000.
Adjustments:
(i) Prepaid Insurance Premium Rs. 600.
(ii) Bad debts Rs. 500 and reserve for doubtful debt @ 5% on debtors
(iii) Interest on Capital @ 6% p.a.
(iv) Depreciation on Machinery @ 10%. (UP 2018)
Answer:
UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

UP Board Solutions

Question 7.
Prepare Balance Sheet of M/s Kingsley Brothers as on 31st December, 2010 from the following information: (UP 2011)
Cash Rs. 16,000; Bank Rs. 24,000; Debtors Rs. 61,000; Machinery (UPBoardSolutions.com) Rs. 74,000; Building Rs. 1,50,000; Bills Receivable Rs. 15,000; Bills Payable Rs. 14,000; Creditors Rs. 21,000; Capital Rs. 2,75,000 ; Drawings Rs. 16,000 ; Bad Debt Reserve Rs. 4,500; Closing Stock Rs. 17,350; Net Profit Rs. 31,460; Furniture Rs. 6,000.
Other Information:
Net Profit was calculated after the following adjustments:
(i) Outstanding salaries Rs. 5,000.
(ii) Prepaid insurance premium Rs. 60.
(iii) Bad Debts Rs. 4,000 and reserve for Bad Debts @ 5% on debtors.
(iv) Interest on Capital and Drawings @ 6%.
(v) Depreciation on Machinery @ 15%. (UP 2011)
Answer:
UP Board Solutions for Class 10 Commerce Chapter 1 Final Accounts

UP Board Solutions for Class 10 Commerce