Sub. Code: 4281'A'
NEB Grade XII
2079(2022)
Computer Science
New Course (For regular students)
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Attempt all the questions.
Group A
Multiple choice questions. 9 × 1 = 9
Rewrite the correct option of each question in your same answer sheet.
1. Which of the following SQL statement is used to DELETE rows from a database table ?
2. A field that is used to uniquely define a particular record in a table is called :
3. What does " MAC " stands for in MAC Address ?
4. What is the correct syntax for referring to an external JavaScript script ?
5. Which of the following is the correct way of defining a variable in PHP ?
6. What is the output of C program?
void main ()
{
int b = 25 ;
// b memory location = 1234 ;
int *p ;
p = & b ;
printf ( " % d % d " , &b , p ) ; }
7. Which feature of OOP is illustrated the code reusability ?
8. Which of following is the discovering requirement from a user in the requirement collection process?
9. What devices are detecting and responding to changes in an environment that are embedded in smart phones and an integral part of the Internet of Things ( IoT ) ?
Group B
Short answer questions5 × 5 = 25
10. Differentiate the centralized and distributed database system.5
OR
What are the purposes of normalization ? Give an example of 2NF.2+3
11. Write a program to find the factorial of any given number using Javascript . 5
OR
How do you fetch data from database in PHP and display it in form ? Describe . 5
12. Compare the OOPs and procedural programing language .
1+4
13. What are the major activities performed to design the software ? Describe . 2.5+2.5
14. Explain the popular five - application areas of AI .
2+3
Group C
Long answer questions2 × 8 = 16
15. Compare the star and ring topology with pros and cons . Which of data communication cable is more appropriate to design the local area network ? Describe.5+3
16. What is structure ? Write a program to input roll , name and age of 5 students and display them properly using structure .2+6
#include<stdio.h>
struct student
{
int roll;
char name[30];
int age;
}s[5];
int main()
{
int i;
for(i=0;i<5;i++)
{
printf("Enter student roll,name and age : ");
scanf("%d%s%d",&s[i].roll,s[i].name,&s[i].age);
}
printf("-------Output-------\n ");
for(i=0;i<5;i++)
{
printf("%d\t%s\t%d\n",s[i].roll,s[i].name,s[i].age);
}
return 0;
}
OR
Write a C program to enter ID , employee_name , and post of the employee and store them in a data file named " emp.txt " . Display each record on the screen in an appropriate format.8