C Programming Solve Question(HISSAN)

HISSAN Pre-Board Examination -2069,2070,2071,2072
C Programming Solve Question


HISSAN Pre Board Examination 2072
Grade – XII
Computer Science
Solved Question
GROUP “A”
1. Differentiate between ‘While’ and ‘do while’ loop. Write a program to display the sum of first 10 even numbers using loop.
Answer:
while loop:
This is an entry controlled looping statement. It is used to repeat a block of statements until condition
becomes true.
Syntax:
while(condition)
{
statements;
increment/decrement;
}
In above syntax, the condition is checked first. If it is true, then the program control flow goes inside the loop and executes the block of statements associated with it. At the end of loop increment or decrement is done to change in variable value. This process continues until test condition satisfies.
Do-While loop :
This is an exit controlled looping statement. Sometimes, there is need to execute a block of statements first then to check condition. At that time such type of a loop is used. In this, block of statements are executed first and then condition is checked.
Syntax:
do
{
statements;
(increment/decrement);
}while(condition);
In above syntax, the first the block of statements are executed. At the end of loop, while statement is
executed. If the resultant condition is true then program control goes to evaluate the body of a loop once again. This process continues till condition becomes true. When it becomes false, then the loop terminates.
Sum of first 10 even numbers:
#include<stdio.h>
void main()
{
int a=1,b=0;
do
{
if(a%2==0)
{
printf("%d\n",a);
b=b+a;
}
a++;
}while(a<=10);
printf("Sum of first 10 even numbers:%d\n",b);
}
2. Write a program which asks nth terms of numbers and sort them in ascending order.
Answer:
#include<stdio.h>
void sort(int);
void main()
{
int a;
printf("Input Total Number:");
scanf("%d",&a);
sort(a);
}
void sort (int a)
{
int b,c[a],d,tmp;
for(b=0;b<a;b++)
{
printf("%d,Input Number:",b+1);
scanf("%d",&c[b]);
}
for(b=0;b<a;b++)
{
for(d=0;d<a;d++)
{
if(c[b]<=c[d])
{
tmp=c[b];
c[b]=c[d];
c[d]=tmp;
}
}
}
for(b=0;b<a;b++)
{
printf("%d\n",c[b]);
}
}
3. Describe the “strcat”,”strcpy”,”strlen” and “strrev” string functions with example.
Answer:
“strcat”
Strcat is a concatenate strings. Appends a copy of the source string to the destination string.
#include<stdio.h>
void main()
{
char *title,name[100];
printf( "Enter your name: " );
scanf( "%s", name );
title = strcat( name, " the Great" );
printf( "Hello, %s\n", title );
}
”strcpy”:
Strcpy is a copy string function. Copies the C string pointed by source into the array pointed by destination
#include<stdio.h>
void main()
{
char a[]="Hello world";
char b[100];
strcpy(b,a);
printf( "%s\n",a);
printf( "copy from a: %s\n",b);
}
”strlen”:
Strlen string function return the string length.
#include<stdio.h>
void main()
{
char a[]="Hello world";
int t;
t=strlen(a);
printf( "Total length of string %d\n",t);
}
“strrev”:
Strrev string function reverse the given string:
#include<stdio.h>
void main()
{
char a[100];
printf("Input String:");
gets(a);
printf("Reverse: %s\n",strrev(a));
}
4. a) Differentiate between structure and union.
Answer:
Structure is user defined data type which is used to store heterogeneous data under unique name.
Keyword 'struct' is used to declare structure. The variables which are declared inside the structure are
called as 'members of structure'. Union is user defined data type used to stored data under unique variable
name at single memory location. Union is similar to that of structure. Syntax of union is similar to structure.
The major difference between structure and union is 'storage.' In structures, each member has its own
storage location, whereas all the members of union use the same location. Union contains many members
of different types, it can handle only one member at a time.
Structure Syntax:
struct emp_info
{
char emp_id[10];
char nm[100];
float sal;
}emp;
Union Syntax:
union union_name
{
int comp_id;
char nm;
float sal;
}tch;
b) Write a program to input a number and find out whether it is odd number or even number.
Answer:
#include<stdio.h>
void main()
{
int a;
printf("Input Number:");
scanf("%d",&a);
if(a%2==0)
printf("%d is Even number\n",a);
else
printf("%d is Odd number\n",a);
}
5. a) Describe ‘fscanf’ and ‘fprintf’ function.
Answer:
The fscanf() function shall read from the file. The sscanf() function shall read from the strings. Each function
reads bytes, interprets them according to a format, and stores the results in its arguments. A set of pointer
arguments indicating where the converted input should be stored. The result is undefined if there are
insufficient arguments for the format. If the format is exhausted while arguments remain, the excess
arguments shall be evaluated but otherwise ignored.
fscanf Syntax:
fscanf(file pointer, "format”,&variable);
The fprintf function formats and writes output to stream. It converts each entry in the argument list, if any,
and writes to the stream according to the corresponding format specification in format.
fprintf Syntax:
fprintf (file pointer, "format", arguments)
Example:
#include <stdio.h>
void main()
{
float f1, f2;
int i1, i2;
FILE *fp;
fp = fopen ("test.txt", "w");
fprintf (fp, "%f %f %d %d",23.5,100.5,100,5);
fclose (fp);
//file created and entered integer and float value
fp = fopen ("test.txt", "r");
fscanf (fp, "%f %f %d %d",&f1,&f2,&i1,&i2);
fclose (fp);
//reading file using fscanf
printf ("Float 1 = %f\n", f1);
printf ("Float 2 = %f\n", f2);
printf ("Integer 1 = %d\n", i1);
printf ("Integer 2 = %d\n", i2);
}
b) Write a program to display name, age and address reading from a file named “record.dat”.
Answer:
#include <stdio.h>
void main()
{
int age;
char nm[20], add[50];
FILE *fp;
//file write
fp = fopen ("record.dat","a");
fprintf (fp, "%s %d %s\n","Numa",15,"Dharan-9");
fclose (fp);
//file reading
fp = fopen ("record.dat", "r");
while(feof(fp)==0)
{
fscanf (fp, "%s %d %s",&nm,&age,&add);
printf ("Name:%s\n",nm);
printf ("Age:%d\n",age);
printf ("Address:%s\n",add);
}
fclose (fp);
}

Solved Question 2071

HISSAN PRE BOARD EXAMINATION 2071
Grade-XII
Subject: Computer Science


Q1) Write a program that reads several different name and address into the computer, rearrange the names into alphabetical order make use of structure variable.

Answer:
#include<stdio.h>
struct st
{
    char nm[5][20],add[5][30],tmp[20],adtmp[20];
};
void main()
{
    struct st t;
    int i,x,y,z;
    puts("<<<Input 5 records>>>");
    for(i=0;i<5;i++)
    {
        printf("%d,Name:",i+1);
        scanf("%s",&t.nm[i]);
        printf("%d,Address:",i+1);
        scanf("%s",&t.add[i]);
    }
    for(x=1;x<5;x++)
    {
        for(y=1;y<5;y++)
        {
            if(strcmp(t.nm[y-1],t.nm[y])>0)
            {
                strcpy(t.tmp,t.nm[y-1]);//name
                strcpy(t.adtmp,t.add[y-1]);//address
                strcpy(t.nm[y-1],t.nm[y]);//name shift
                strcpy(t.add[y-1],t.add[y]);//address shift
                strcpy(t.nm[y],t.tmp);//name shift to first
                strcpy(t.add[y],t.adtmp);//address shift to first
            }
        }
    }
    puts("\n\n<<<Sorting records>>>\n");
    for(z=0;z<5;z++)
    {
        printf("Name:%s,Address:%s\n",t.nm[z],t.add[z]);
    }

}


Q4) Write a program to delete and rename the data file usingg remove and rename command.
Answer:

#include<stdio.h>
void main()
{
    char of[128],nf[128],fn[128];
    int ch,chk;
    puts("1,File Rename");
    puts("2,Remove File");
    puts("3,Exit");
    printf("Your Choice:");
    scanf("%d",&ch);
    getchar();
    switch(ch)
    {
    case 1:
        printf("Input Old File Name:");
        gets(of);
        printf("Input New File Name:");
        gets(nf);
        chk=rename(of,nf);
        if(chk==0)
            printf("Rename success!\n");
        else
            printf("Rename Unsuccess!\n");
        break;
    case 2:
        printf("To delete,Input file name:");
        gets(fn);
        chk=remove(fn);
        if(chk==0)
            printf("Remove success!\n");
        else
            printf("Remove Unsuccess!\n");
        break;
    case 3:
        puts("Good Bye!!");
        exit(1);
    default:
        puts("Unknown Choice!!");
        puts("Good Bye!!");
    }
}




Solved Question 2070

HISSAN PRE BOARD EXAMINATION 2070
Grade-XII
Subject: Computer Science
Long Answer:
Q. 1) What is looping? Describe “for”, “while” and “do-while” loops with appropriate examples.
Answer:
Looping statements or Iterative Statements
'A loop' is a part of code of a program which is executed repeatedly. A loop is used using condition. The repetition is done until condition becomes condition true. A loop declaration and execution can be done in following ways.
·         Check condition to start a loop
·         Initialize loop with declaring a variable.
·         Executing statements inside loop.
·         Increment or decrement of value of a variable.
For loop:
This is an entry controlled looping statement. In this loop structure, more than one variable can be initialized. One of the most important feature of this loop is that the three actions can be taken at a time like variable initialization, condition checking and increment/decrement. The “for” loop can be more concise and flexible than that of while and do-while loops.
Syntax:
for(initialisation; test-condition; incre/decre)
{
statements;
}

Example:
#include <stdio.h>
void main()
{
int a;
clrscr();
for(i=1; i<=5; i++)
{
printf("i=%d\n");
}
}


while loop:
This is an entry controlled looping statement. It is used to repeat a block of statements until condition becomes true.
Syntax:
while(condition)
{
statements;
increment/decrement;
}
In above syntax, the condition is checked first. If it is true, then the program control flow goes inside the loop and executes the block of statements associated with it. At the end of loop increment or decrement is done to change in variable value. This process continues until test condition satisfies.

Example:
#include <stdio.h>
#include <conio.h>
void main()
{
int a;
clrscr();
a=1;
while(a<=5)
{
printf("\n %d \n",a);
a++;
}
getch();
}

Do-While loop :
This is an exit controlled looping statement. Sometimes, there is need to execute a block of statements first then to check condition. At that time such type of a loop is used. In this, block of statements are executed first and then condition is checked.
Syntax:
do
{
statements;
(increment/decrement);
}while(condition);
In above syntax, the first the block of statements are executed. At the end of loop, while statement is executed. If the resultant condition is true then program control goes to evaluate the body of a loop once again. This process continues till condition becomes true. When it becomes false, then the loop terminates.

Example:
#include <stdio.h>
void main()
{
int a;
a=5;
do
{
printf("%d\n ",a);
a++;
}while(a<=1);
}


Q.2) What is recursive function? Write a program to calculate the factorial of an integer using recursion.

Answer:
When a function of body calls the same function then it is called as 'recursive function’. Recursion is a tool to allow the programmer to concentrate on the key step of an algorithm, without having initially to worry about coupling that step with all the others.

Program:
#include<stdio.h>
int recursion(int a)
{
    if(a==0)
        return 1;
    return (a*recursion(a-1));
}
void main()
{
    int i,j;
    printf("Input number for factorial:");
    scanf("%d",&i);
    j=recursion(i);
    printf("Factorial Number:%d\n",j);

}


Q.3) Write a program to input names of ‘n’ numbers of students and sort them in alphabetical order.

Answer:
#include<stdio.h>
void main()
{
    char nm[100][20];
    char tmp[20];
    int r,i,j,m,n,l;
    printf("How many records?");
    scanf("%d",&r);

    for(i=0;i<r;i++)
    {
        printf("Input Name:");
        scanf("%s",&nm[i]);
    }
    printf("\n\n\nWithout sorting:\n");
    for(j=0;j<r;j++)
    {
        printf("%s\n",nm[j]);
    }
    printf("\n\n\nAfter sorting:\n");
    for(m=0;m<r;m++)
    {
        for(n=0;n<r;n++)
        {
            if(strcmp(nm[n-1],nm[n])>0)
            {
                strcpy(tmp,nm[n-1]);
                strcpy(nm[n-1],nm[n]);
                strcpy(nm[n],tmp);
            }
        }
    }
    for(l=0;l<r;l++)
    {
        printf("%s\n",nm[l]);
    }
}

Q.4) Differentiate between structure and union with suitable examples.

Answer:
Structure is user defined data type which is used to store heterogeneous data under unique name. Keyword 'struct' is used to declare structure. The variables which are declared inside the structure are called as 'members of structure'. Union is user defined data type used to stored data under unique variable name at single memory location. Union is similar to that of structure. Syntax of union is similar to structure.
The major difference between structure and union is 'storage.' In structures, each member has its own storage location, whereas all the members of union use the same location. Union contains many members of different types, it can handle only one member at a time.

Structure Syntax:
struct emp_info
{
char emp_id[10];
char nm[100];
float sal;
}emp;

Example:
#include <stdio.h>
#include <conio.h>
struct comp_info
{
char nm[100];
char addr[100];
}info;
void main()
{
clrscr();
printf("\n Enter Company Name : ");
gets(info.nm);
printf("\n Enter Address : ");
gets(info.addr);
printf("\n\n Company Name : %s",info.nm);
printf("\n\n Address : %s",info.addr);
getch();
}

Union Syntax:
union union_name
{
int comp_id;
char nm;
float sal;
}tch;
In above syntax, it declares tch variable of type union. The union contains three members as data type of int, char, float. We can use only one of them at a time.
Example:
#include <stdio.h>
#include <conio.h>
union myunion
{
int id;
char nm[50];
}tch;
void main()
{
clrscr();
printf("\n\t Enter developer id : ");
scanf("%d", &tch.id);
printf("\n\n\t Enter developer name : ");
scanf("%s", &tch.nm);
printf("\n\n Developer ID : %d", tch.id);        //Garbage
printf("\n\n Developed By : %s", tch.nm);
getch();
}


Q.5) Write a program to delete and rename the data file using remove and rename commands.

Answer:
Delete Data file:
#include<stdio.h>
void main()
{
   int status;
   char file_name[25];

   printf("Enter the name of file you wish to delete\n");
   gets(file_name);

   status = remove(file_name);

   if( status == 0 )
      printf("%s file deleted successfully.\n",file_name);
   else
   {
      printf("Unable to delete the file\n");
      perror("Error");
   }
}

Rename Data File

#include<stdio.h>
void main()
{
   int status;
   char file_name[25],newname[25];

   printf("Enter the name of file you wish to rename:");
   gets(file_name);
   printf("File Name:%s\n",file_name);
   printf("Rename your file:");
   gets(newname);
   status = rename(file_name,newname);

   if( status == 0 )
      printf("%s file renamed successfully into %s.\n",file_name,newname);
   else
   {
      printf("Unable to rename the file\n");
      perror("Error");
   }


}





 Solved Question 2069


Q1) what is infinite loop? Differentiate between “break” and “continue” statement. Write a program to read any number and find it is even or odd.
Ans:
An infinite loop is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over. Infinite loops are used to assure a program segment loops forever or until an exceptional condition arises, such as an error.
Break Statement
In C programming, break is used in terminating the loop immediately after it is encountered. The break statement is used with conditional if statement. For Example,
#include<stdio.h>

    int main()
    {
             int i;
        i = 0;
        while ( i < 20 )
             {
                  i++;
                  if ( i == 10)
                       break;
             }
             return 0;
    }
Continue Statement
It is sometimes desirable to skip some statements inside the loop. In such cases, continue statements are used. For Example,
#include<stdio.h>
    int main()
    {
        int i;
        i = 0;
             while ( i < 20 )
             {
                  i++;
                  continue;
                  printf("Nothing to see\n");
             }
             return 0;
    }

Odd, Even program:
#include<stdio.h>
void main()
{
    int num;
    printf("Input Number:");
    scanf("%d",&num);
    if(num%2==0)
    printf("%d is Even\n",num);
    else
    printf("%d is Odd\n",num);
}


Q2) Differentiate between Structure and Array? Write a program in C that reads the age of 100 persons and count the number of person in the age group between 50 and 60.
Ans.
Differentiate between Structure and Array.
Both the arrays and structures are classified as structured data types as they provide a mechanism that enable us to access and manipulate data in a relatively easy manner. But they differ in a number of ways listed in table below:

Arrays
Structures
1. An array is a collection of related data elements of same type.
1. Structure can have elements of different  types
2. An array is a derived data type
2. A structure is a programmer-defined data type
3. Any array behaves like a built-in data types. All we have to do is to declare an array variable and use it.
3. But in the case of structure, first we have to design and declare a data structure before the variable of that type are declared and used.

100 persons, Age between 50 and 60:
#include<stdio.h>
void main()
{
    int tot=0,num,age,i;
    printf("Number of persons:");
    scanf("%d",&num);
    for(i=1;i<=num;i++)
    {
        printf("person %d age:",i);
        scanf("%d",&age);
        if(age>=50 && age<=60)
        tot=tot+1;
    }
    printf("Age between 50 and 60: %d\n",tot);
}

Q3) Write a program that reads 10 persons names and address into the computer; and sorts the name into alphabetical order using structure variable.
Ans:
#include<stdio.h>
#include<string.h>
struct str
{
    char nm[10][20];
    char add[10][20];
};
void main()
{
struct str st;
char t[20];
int a,b,c,i,j;
for(a=0;a<10;a++)
{
printf("input name:");
scanf("%s",&st.nm[a]);
printf("input address:");
scanf("%s",&st.add[a]);
}
for(b=0;b<10;b++)
{
    printf("Name:%s\nAddress:%s\n-----------\n",st.nm[b],st.add[b]);
}
printf("Sorting names:\n");
for(i=1;i<10;i++)
    {
    for(j=1;j<10;j++)
        {
        if(strcmp(st.nm[j-1],st.nm[j])>0)
            {
            strcpy(t,st.nm[j-1]);
            strcpy(st.nm[j-1],st.nm[j]);
            strcpy(st.nm[j],t);
            }
        }
    }
    for(b=0;b<10;b++)
    {
    printf("Name:%s\n",st.nm[b]);
    }
}

Q4) Write data file operation modes? Write a program to accept any 20 employee’s records (Empno, Name, Address and Phone). Store these records on ABC.txt file.
Ans:
#include<stdio.h>
void main()
{
    FILE *f;
    char nm[10][30],add[10][35],ph[10][15];
    int empno[10],i,j;
    for(i=0;i<10;i++)
    {
        printf("Input EmpNo.:");
        scanf("%d",&empno[i]);
        printf("empno:%d\n",empno[i]);
        getchar();
        printf("Input Name:");
        scanf("%s",&nm[i]);
        printf("\nname:%s\n",nm[i]);
        printf("Input Address:");
        scanf("%s",&add[i]);
        printf("\naddress:%s\n",add[i]);
        printf("Input Phone:");
        scanf("%s",&ph[i]);
        printf("\nphone:%s\n",ph[i]);
    }
    for(j=0;j<10;j++)
    {
        f=fopen("ABC.TXT","a");
        fprintf(f,"Empno:%d\nName:%s\nAddress:%s\nPhone:%s\n",empno[j],nm[j],add[j],ph[j]);
        fclose(f);
    }
}

Q5.a) Write a program to find factorial of any number using recursive function.
Ans:
#include<stdio.h>
int fact(int m)
{
    if(m==0)
        return 1;
    else
    return(m*fact(m-1));
}
void main()
{
    int num,i,j,a;
    printf("Input number:");
    scanf("%d",&a);
    for(i=1;i<=a;i++)
    {
        j=fact(a);
    }
    printf("%d\n",j);
}

Q5.b) Write a program to enter 4-digit number and find sum of them.
Ans:
#include<stdio.h>
void main()
{
    int num,rem,sum=0;
    printf("Input Integer:");
    scanf("%d",&num);
    while(num>0)
    {
        rem=num%10;
        sum=sum+rem;
        num=num/10;
    }
   printf("Sum:%d\n",sum);
}


(Group B)


(Short Answer Questions)



Q6) What is Information System? Explain the different types of information systems.

Ans:
Information System is an arrangement of people, data, processes, information presentation and information technology that interacts to support and improve day-to-day operations in a business as well as support the problem solving and decision making needs of management and users.
Types of Systems
a) Formal or Informal
b) Physical or Abstract
c) Open or Closed
d) Manual or Automated.
a) Formal System: is one that is planned in advance and is used according to schedule. In this system policies and procedures are documented well in advance. A real life example is to conduct a scheduled meeting at the end of every month in which agenda of the meeting has already been defined well in advance.
Informal System: is the system that is not described by procedures. It is not used According to a schedule. It works on as need basis. For example, Sales order processing system through telephone calls.
b) Physical Systems: are tangible (or touchable) entities that may be static or dynamic. Computer
Systems, Vehicles, Buildings etc. are examples of physical systems.
Abstract systems: are conceptual entities. Example: Company

c) Open System is a system within its environment. It receives input from environment and provides output to environment. Example: Any real life system, Information System, Organization etc.
Closed System: It is isolated from environment influences. It operates on factors within the System itself.
It is also defined as a System that includes a feedback loop, a control element and feedback performance standard. System that enables the System to regulate itself. Signals are obtained from the System describing the System Status and are transmitted to the Control Mechanism. A Control Element compares the output with the performance standard and adjusts the system input accordingly.
d) Automated systems: the system, which does not require human intervention, is called automated system. In this system, the whole process is automatic. Example: Traffic control system for metropolitan cities.
Manual System: The system, which requires human intervention, is called a Manual System.
Example: Face to face information Centre at places like Railway stations etc.

Q7) What is feasibility study? Explain different levels of feasibility study.

Ans:
In the system development life cycle (SDLC), third phase is analysis phase. During this phase, the analysis has several sub‐phases. The first is requirements determination. In this sub‐phase, analysts work with users to determine the expectations of users from the proposed system. Second, the requirements are studied and structured in accordance with their inter‐relationships and eliminate any redundancies. Third, alternative initial design is generated to match the requirements. Then, these alternatives are compared to determine which alternative best meets the requirement in terms of cost and labor to commit to development process. feasibility study of the proposed system is performed. Various types of feasibilities are:
• Technical feasibility
• Economic feasibility
• Operational feasibility
• Legal feasibility
Technical Feasibility:
Technical feasibility is concerned with the availability of hardware and software required for the development of the system, to see compatibility and maturity of the technology proposed to be used and to see the availability of the required technical manpower to develop the system.

Economic Feasibility:
It is the measure of cost effectiveness of the project. The economic feasibility is nothing but judging whether the possible benefit of solving the problems is worthwhile or not. When the specific requirements and solutions have been identified, the analyst weighs the cost and benefits of all solutions, this is called “cost benefit analysis”. A project which is expensive when compared to the savings that can be made from its usage, then this project may be treated as economically infeasible.

Operational Feasibility:
Operational feasibility is all about problems that may arise during operations.
Information The system needs to provide adequate, timely, accurate and useful information. It should be able to supply all the useful and required information to all levels and categories of users.
Response time It needs to study the response time of the system in term of throughput. It should be fast enough to give the required output to the users.
Accuracy A software system must operate accurately. It means that it should provide value to its users. Accuracy is the degree to which the software performs its required functions and gives desired output correctly.
Security There should be adequate security to information and data. It should be able to protect itself from fraud.
Services The system needs to be able to provide desirable and reliable services to its users.
Efficiency The system needs to be able to use maximum of the available resources in an efficient manner so that there are no delays in execution of jobs.

Legal Feasibility:
Legal feasibility studies issues arising out of the need to the development of the system. The possible consideration might include copyright law, labor law, antitrust legislation, foreign trade, regulation, etc. Legal feasibility plays a major role in formulating contracts between vendors and users.

Q8) What do you mean by Artificial Intelligence? Explain its application areas.

Ans:
Artificial intelligence is the simulation of human intelligence processes by machines, especially computer systems. These processes include learning (the acquisition of information and rules for using the information), reasoning (using the rules to reach approximate or definite conclusions), and self-correction. Artificial Intelligence is a part of computer science that is focused on developing such machines or systems which could solve the problems that may otherwise require human intelligence. Artificial intelligence combines the features of computer science, physiology and philosophy. The idea is to make a machine artificially intelligent by incorporating such programs and equipment that are capable of taking decisions on their own in case of problems in a particular domain for which the system is made.
Applications of AI include expert systems, speech recognition, and machine vision. Artificial intelligence is the search for a way to map intelligence into mechanical hardware and enable a structure into that system to formalize thought. Researcher are creating such systems that can imitate the thoughts of human, recognize human speech and interact with them, question and answering systems, moving the chess moves according to the move of the human opponent.

Q9) What is database model? Explain its types with example.

Ans:
A database model is the structure or format of a database, described in a formal language supported by the database management system, In other words, a "database model" is the application of a data model when used in conjunction with a database management system. A database model is buyout theory or specification describing how a database is structured and used.
Some common models are:
Hierarchical model
Network model
Relational model
Entity‐relationship

Hierarchical database model
Hierarchical database model is a structure of data organized in a tree‐like model using parent/child like relationships, therefore there won't be too many relationships. In a hierarchical database, an entity type can be either a parent or a child; under each individual entity is more multiple entities. Entity types are related to each other using tree mapping, which is represented by one parent with many child relationships. There are also attributes of a specific data recorded under an entity.

Network Model
A network database model is a database model that allows multiple records to be linked to the same owner file. The model can be seen as an upside down tree where the branches are the member information linked to the owner, which is the bottom of the tree. The multiple linkages which this information allows the network database model to be very flexible. In addition, the relationship that the information has in the network database model is defined as many‐to‐many relationship because one owner file can be linked to many member files and vice versa.

Relational model
A model in database system basically defines the structure or organization of data and a set of operations on that data. Relational model is a simple model in which database is represented as a collection of “Relations”, where each relation is represented by a two dimensional table. Thus, because of its simplicity it is most commonly used.

ENTITY RELATIONSHIP (ER) MODEL
Entity relationship model is a high-level conceptual data model. It allows us to describe the data involved in a real-world enterprise in terms of objects and their relationships. It is widely used to develop an initial design of a database. It provides a set of useful concepts that make it convenient for a developer to move from a basic set of information to a detailed and precise description of information that can be easily implemented in a database system. It describes data as a collection of entities, relationships and attributes.


Q10) What is e-commerce? Discuss its types with example.

Ans:
E-commerce is generally considered to be the sales aspect of e-business. It also consists of the exchange of data to facilitate the financing and payment aspects of business transactions.
E-Commerce is a type of industry where buying and selling of product or service is conducted over electronic systems such as the Internet and other computer networks. E-commerce draws on technologies such as mobile commerce, electronic funds transfer, supply chain management, Internet marketing, online transaction processing, electronic data interchange, inventory management systems, and automated data collection systems.

Types of e-commerce are:
Business to Business Ecommerce (B2B Ecommerce)
In this type of ecommerce, both participants are businesses. As a result, the volume and value of B2B ecommerce can be huge. An example of business to business ecommerce could be a manufacturer of gadgets sourcing components online.

Business to Consumer Ecommerce (B2C Ecommerce)
The B2C e-commerce, Its  Elimination of the need for physical stores is the biggest rationale for business to consumer ecommerce. But the complexity and cost of logistics can be a barrier to B2C ecommerce growth.

Consumer to Business Ecommerce (C2B Ecommerce)
On the face of it, C2B ecommerce seems lop-sided. But online commerce has empowered consumers to originate requirements that businesses fulfill. An example of this could be a job board where a consumer places her requirements and multiple companies bid for winning the project. Another example would be a consumer posting his requirements of a holiday package, and various tour operators making offers.

Consumer to Consumer Ecommerce (C2C Ecommerce)
The C2C e-commerce that enables consumers to sell to other consumers.

Q11) Who is system analyst? Mention the characteristics of good system analyst.

Ans:
Systems analyst facilitates most of the activities to develop or acquire an information system. S/he studies the problems and needs of an organization to determine how people, data, processes, communication and information technology can best accomplish improvement of the business. The work of a systems analyst who designs an information system is the same as an architect of a house.
Three groups of people are involved in developing information systems for organizations. They are managers, users of the systems and computer programmers who implement systems. The systems analyst coordinates the efforts of all these groups to effectively develop and operate computer based information systems. Systems analysts develop information systems.
CHARACTERISTICS OF A SYSTEMS ANALYST
• Working knowledge of information technology
• Computer programming experience and expertise
• General business knowledge
• Problem solving skills
• Communication skills
• Interpersonal skills
• Flexibility and adaptability
• Thorough knowledge of analysis and design methodologies.

Q12) What is networking? Explain different types of network topologies.

Ans:
A computer network is a set of computers or devices that are connected with each other to carry on data and share information. In computing, it is called a network as a way to interconnect two or more devices to each other using cables, signals, waves or other methods with the ultimate goal of transmitting data, share information, resources and services.
Different types of network topologies:
Network topology is the layout pattern of interconnections of the various elements (links, nodes, etc.) of a computer or biological network. Network topologies may be physical or logical. Physical topology refers to the physical design of a network including the devices, location and cable installation. Logical topology refers to how data is actually transferred in a network as opposed to its physical design.

Bus Topology:
In local area networks where bus topology is used, each node is connected to a single cable. Each computer or server is connected to the single bus cable. A signal from the source travels in both directions to all machines connected on the bus cable until it finds the intended recipient.
Star Topology:
Star networks are one of the most common computer network topologies. In its simplest form, a star network consists of one central switch, hub or computer, which acts as a conduit to transmit messages. This consists of a central node, to which all other nodes are connected; this central node provides a common connection point for all nodes through a hub.

Ring Topology:
A ring network is a network topology in which each node connects to exactly two other nodes, forming a single continuous pathway for signals through each node - a ring. Data travels from node to node, with each node along the way handling every packet. Because a ring topology provides only one pathway between any two nodes, ring networks may be disrupted by the failure of a single link.


Tree Topology:
Tree topology in which a central 'root' node (the top level of the hierarchy) is connected to one or more other nodes that are one level lower in the hierarchy (i.e., the second level) with a point-to-point link between each of the second level nodes and the top level central 'root' node, while each of the second level nodes that are connected to the top level central 'root' node will also have one or more other nodes that are one level lower in the hierarchy (i.e., the third level) connected to it, also with a point-to-point link, the top level central 'root' node being the only node that has no other node above it in the hierarchy.


Mesh Topology:
Mesh topology is a type of networking where each node must not only capture and disseminate its own data, but also serve as a relay for other nodes, that is, it must collaborate to propagate the data in the network. A mesh network can be designed using a flooding technique or a routing technique. When using a routing technique, the message is propagated along a path, by hopping from node to node until the destination is reached. To ensure all its paths' availability, a routing network must allow for continuous connections and reconfiguration around broken or blocked paths, using self-healing algorithms. A mesh network whose nodes are all connected to each other is a fully connected network.



Q13) What is multimedia? Explain its components and use.

Ans:
Multimedia is media and content that uses a combination of different content forms. The term can be used as a noun (a medium with multiple content forms) or as an adjective describing a medium as having multiple content forms. Multimedia includes a combination of text, audio, still images, animation, video, and interactivity content forms. Multimedia is usually recorded and played, displayed or accessed by information content processing devices, such as computerized and electronic devices, but can also be part of a live performance. Multimedia (as an adjective) also describes electronic media devices used to store and experience multimedia content. Multimedia is distinguished from mixed media in fine art; by including audio, for example, it has a broader scope. The term "rich media" is synonymous for interactive multimedia.
Component of Multimedia
Text, audio, still images, animation, video, and interactivity content forms are multimedia components.

Q14) Write short notes on any two.

  a) SQL
Ans:
Structured Query Language(SQL) is a special-purpose programming language designed for managing data held in a relational database management systems (RDBMS).Originally based upon relational algebra and tuple relational calculus, SQL consists of a data definition language and a data manipulation language. The scope of SQL includes data insert, query, update and delete, schema creation and modification, and data access control. Although SQL is often described as, and to a great extent is, a declarative language (4GL), it also includes procedural elements.

  b)  DBA
Ans:
One of the main reasons for having the database management system is to have control of both data and programs accessing that data. The person having such control over the system is called the database administrator (DBA). The DBA administers the three levels of the database and defines the global view or conceptual level of the database. The DBA also specifies the external view of the various users and applications and is responsible for the definition and implementation of the internal level, including the storage structure and access methods to be used for the optimum performance of the DBMS.

   c)       Social impacts of ICT in society.
Ans:

Within the current digital revolution, do information communication technologies (ICTs) improve our lives and stimulate increased social interaction. Information Communication Technology is basically an electronic based system of information transmission, reception, processing and retrieval, which has drastically changed the way we think, the way we live and the environment in which we live. It must be realized that globalization is not limited to the financial markets, but encompasses the whole range of social, political, economic and cultural phenomena. Information and communication technology revolution is the central and driving force for globalization and the dynamic change in all aspects of human existence is the key by‐product of the present globalization period of ICT revolution.



Thank you



.

1 comment:

Thanks for your great comment!