Answers On/OffJS required
Group A
- Q.Tick the correct answer. 1. Which of the statements are used in DDL? a. Create, alter and drop b. Create, insert and select c. Insert, update and delete d. Delete, alter and dropA.✔ a. Create, alter and drop
- Q2.With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" ends with an "a"? a. SELECT * FROM Persons WHERE FirstName="a" b. SELECT * FROM Persons WHERE FirstName LIKE „a%” C. SELECT * FROM Persons WHERE FirstName LIKE ,,%a" d. SELECT * FROM Persons WHERE FirstName="%a%"A.✔ c. SELECT * FROM Persons WHERE FirstName LIKE "%a"
- Q3.Which of the following statements is true about a star network topology? a. Each device is connected to a switch or hub b. Each device is connected to each other c. Each device is connected in a trunk d. Each device is connected to a terminalA.✔ a. Each device is connected to a switch or hub
- Q4.Which of the following is the correct syntax to display "Stay Safe" in an alert box using JavaScript? a. alert-box("Stay Safe"); b. confirm("Stay Safe"); c. msgbox("Stay safe"); d. alert(“Stay Safe”);A.✔ d. alert("Stay Safe");
- Q5.What is the use of tag? a. To insert an image b. To create a link c. To create a hyperlink d. To create a listA.✔ c. To create a hyperlink
- Q6.What is the output of given C program? void main(){ char str1[] = "FIRST"; char str2[20]; strcpy(str2,str1); printf("%s %s",str1,str2); printf("%d", (str1!=str2)); printf("%d", strcmp(str1,str2)); } a. FIRST FIRST 0 0 b. FIRST FIRST 11 C. FIRST FIRST 1 0 d. FIRST FIRST 0 1A.✔ c. FIRST FIRST 1 0
- Q7.Where is a class derived in inheritance? a. Superclass b. Subclass C. Subsetclass d. RelativeclassA.✔ b. Subclass
- Q8.Which of these is the correct order of the SDLC? a. Analysis, Design, Coding, Testing. Implementation b. Analysis, Design, Testing, Implementation, Coding c. Implementation, Coding, Analysis, Design, Testing d. Design, Testing, Implementation, Coding, AnalysisA.✔ a. Analysis, Design, Coding, Testing, Implementation
- Q9.Why is cloud computing popular nowadays? a. Cost-sharing and easily accessible b. As modern technology and costly c. Accessible and freely available d. Affordable to allA.✔ a. Cost-sharing and easily accessible
Group B
- Q.Short Answer Questions 1. Explain 2NF and 3NF with examples. OR Demonstrate the basic DML statement with an example.A.📘 2NF – Second Normal FormA table is in 2NF when:
- It is already in 1NF (no repeating groups),
- And no partial dependency exists.
🔹 Partial dependency means a non-key column depends only on part of the primary key (not full key).👉 Example:Before 2NF (Not in 2NF):StudentID Subject TeacherName 1 Math Mr. Sharma 1 Science Ms. Karki 2 Math Mr. Sharma Here, StudentID + Subject is the primary key.But TeacherName depends only on Subject, not on full primary key.✅ After 2NF:Table 1: StudentSubjectsStudentID Subject 1 Math 1 Science 2 Math Table 2: SubjectTeacherSubject TeacherName Math Mr. Sharma Science Ms. Karki 📗 3NF – Third Normal FormA table is in 3NF when:- It is in 2NF,
- And no transitive dependency exists.
🔹 Transitive dependency means a non-key column depends on another non-key column.👉 Example:Before 3NF (Not in 3NF):StudentID Name DeptID DeptName 1 Sita D1 Science 2 Ram D2 Management Here, DeptName depends on DeptID, not directly on StudentID.✅ After 3NF:Table 1: StudentStudentID Name DeptID 1 Sita D1 2 Ram D2 Table 2: DepartmentDeptID DeptName D1 Science D2 Management 🔹 DML = Data Manipulation Language (used to work with data in the table)Basic DML commands are:- INSERT → To add data
- SELECT → To read data
- UPDATE → To change data
- DELETE → To remove data
👉 Example:Suppose we have a table:Student (ID, Name, Class)a) INSERT:INSERT INTO Student (ID, Name, Class)VALUES (1, 'Ram', 12);b) SELECT:SELECT * FROM Student;c) UPDATE:UPDATE Student SET Name = 'Shyam' WHERE ID = 1;d) DELETE:DELETE FROM Student WHERE ID = 1; - Q2.Write a function to add any two numbers in Javascript. OR Demonstrate the external CSS implemented in the web page.A.You can create a function in JavaScript like this:function addNumbers(a, b) {return a + b;}// Example uselet sum = addNumbers(5, 7);console.log("The sum is: " + sum);Explanation:
- function addNumbers(a, b) defines the function.
- a and b are the numbers you want to add.
- return a + b sends back the total.
- console.log(...) shows the result on the screen.
External CSS means writing the style in a separate .css file and linking it in your HTML.👉 Step 1: Create a CSS File (e.g., style.css)/* style.css */body {background-color: lightblue;font-family: Arial, sans-serif;}h1 {color: darkblue;text-align: center;}👉 Step 2: Link the CSS File in HTML<!DOCTYPE html><html><head><title>External CSS Example</title><link rel="stylesheet" type="text/css" href="style.css"></head><body><h1>Welcome to My Web Page</h1></body></html> - Q3.Describe any five features of OOPS.A.OOP is a programming style that is based on objects and classes. It helps to make big programs easier to manage.Here are five main features of OOP:1. Class
- A class is like a blueprint or template.
- It defines what data (variables) and actions (functions) an object can have.
🟢 Example: A Car class can have color, model, and a function to drive.2. Object- An object is a real example of a class.
- It has its own data and functions from the class.
🟢 Example: car1 and car2 are objects of the Car class.3. Encapsulation- It means hiding the internal details of an object.
- Only important things are shown, others are hidden using private or public keywords.
🟢 Example: You use a TV remote, but you don’t need to know how it works inside.4. Inheritance- It means one class can get properties and functions from another class.
- It helps in reusing code.
🟢 Example: A Bus class can inherit from a Vehicle class.5. Polymorphism- It means one function can work in different ways depending on the situation.
🟢 Example: A function called draw() can draw a circle or square based on what object calls it. - Q4.What are the different stages of software planning? Describe.A.Software planning is the first step in software development. It helps to make a clear plan before building the software. This makes the project more successful and well-organized.Here are the main stages of software planning:1. Problem Identification
- Understand what the client wants or what the problem is.
- Talk to the users or company to find their needs.
🟢 Example: A school wants software to manage student records.2. Feasibility Study- Check if the project is possible to do or not.
- Study technical, financial, and time factors.
🟢 Types:- Technical feasibility – Do we have the tools or skills?
- Economic feasibility – Is it affordable?
- Schedule feasibility – Can we finish on time?
3. Requirement Analysis- Gather all the details about what the software should do.
- Create a list of features the software must have.
🟢 Example: Add student records, calculate marks, print report cards, etc.4. Resource Planning- Decide what resources (people, tools, time, money) are needed.
- Assign work to the right team members.
5. Project Scheduling- Create a timeline to finish the project step-by-step.
- Use tools like Gantt charts to plan time and tasks.
- Q5.Define the concept of Al and loT.A.📘 AI (Artificial Intelligence)AI means Artificial Intelligence.It is a technology where machines or computers think and work like humans. AI can learn from data, solve problems, and make decisions.👉 Example:
- Google Assistant
- Self-driving cars
- Chatbots
✅ Features:- Learns from experience (data)
- Makes smart decisions
- Works without human help
📗 IoT (Internet of Things)IoT means Internet of Things.It is a system where devices are connected to the internet and can send or receive data.These devices can be mobile, machines, sensors, or anything that connects online.👉 Example:- Smart home (lights, fans, AC controlled from phone)
- Smartwatches
- Smart farming tools
✅ Features:- Connects physical devices to the internet
- Allows remote control and monitoring
- Shares real-time data
Practice Without Boundaries.
Premium gives you full access, zero ads, and unlimited custom paper generation. Study your way, every day.
Group C
- Q.Long Answer Questions 6. How do you implement the Class C IP address in the local area network? Describe.A.A Class C IP address is used in small networks like schools, offices, or homes.
- Class C IPs range from 192.0.0.0 to 223.255.255.255
- Default subnet mask is 255.255.255.0
- It can support 254 devices in one network
📗 How to Implement Class C in LAN:1. Choose a Class C IP rangeUse private IPs (recommended for LAN):- Example range: 192.168.1.0 to 192.168.1.255
2. Set up Subnet Mask- Use 255.255.255.0 to allow 254 devices in the same network
3. Assign IP addresses to devices- Manually or automatically (using DHCP)
- Example: Router: 192.168.1.1 Computer 1: 192.168.1.2 Printer: 192.168.1.3
4. Connect Devices to LAN- Use switch, router, or hub
- Connect all devices using LAN cables (or Wi-Fi)
5. Check Network Connection- Use ping command to check if devices are connected properly.
✅ Example:Device IP Address Router 192.168.1.1 Computer 1 192.168.1.2 Printer 192.168.1.3 Computer 2 192.168.1.4 All these are Class C IPs in the same network. - Q7.Write a program to enter ten integer numbers into an array. sort and display them in ascending order. OR Write a program to read the marks of any 5 students in a subject and count how many students are pass and fail.A.Here's a simple C program that:
- Takes 10 integer numbers from the user
- Stores them in an array
- Sorts the array in ascending order
- Displays the sorted numbers
✅ C Program:#include <stdio.h>int main() {int arr[10], i, j, temp;// Taking input from userprintf("Enter 10 integer numbers: ");for(i = 0; i < 10; i++) {printf("Number %d: ", i + 1);scanf("%d", &arr[i]);}// Sorting using simple bubble sortfor(i = 0; i < 9; i++) {for(j = i + 1; j < 10; j++) {if(arr[i] > arr[j]) {// swaptemp = arr[i];arr[i] = arr[j];arr[j] = temp;}}}// Display sorted arrayprintf("\nNumbers in ascending order: ");for(i = 0; i < 10; i++) {printf("%d ", arr[i]);}return 0;}📘 Output Example:Enter 10 integer numbers:Number 1: 45Number 2: 12Number 3: 5...Numbers in ascending order:5 12 23 34 45 56 67 78 89 90Here's a simple C program to:- Read marks of 5 students
- Count how many students passed and how many failed
- (Let’s assume pass mark = 40)
✅ C Program:#include <stdio.h>int main() {int marks[5];int i, pass = 0, fail = 0;// Read marks of 5 studentsprintf("Enter marks of 5 students: ");for(i = 0; i < 5; i++) {printf("Student %d: ", i + 1);scanf("%d", &marks[i]);// Check pass or fail (assuming pass mark is 40)if(marks[i] >= 40)pass++;elsefail++;}// Display resultsprintf("\nNumber of students passed: %d ", pass);printf("Number of students failed: %d ", fail);return 0;}📘 Output Example:Enter marks of 5 students:Student 1: 45Student 2: 38Student 3: 60Student 4: 25Student 5: 70Number of students passed: 3Number of students failed: 2