10<\/sub> is
\nAnswer:
\n6<\/p>\nQuestion 2.
\nThe process of detecting and correcting errors in a program is called …………
\nAnswer:
\nDebugging<\/p>\n
Question 3.
\nName any two keywords in C++.
\nAnswer:
\nint, float<\/p>\n
Question 4.
\nThe memory size required for void data type is ………..
\nAnswer:
\n0<\/p>\n
Question 5.
\nRewrite the expression a = a + 1 using an arithmetic assignment operator.
\nAnswer:
\na+=1 or a++ or ++a.<\/p>\n
Part – B<\/span><\/p>\nAnswer 9 questions from 6 to 16. Each carries 2 scores each. (9 \u00d7 2 = 18)<\/span><\/p>\nQuestion 6.
\nFind the octal and hexadecimal equivalent of (111101)2<\/sub>.
\nAnswer:
\n(75)8<\/sub>
\n(3D)16<\/sub><\/p>\nQuestion 7.
\nWrite short note on any two utility softwares.
\nAnswer:
\nUtilities: Utilities are programs which are designed to assist computer for its smooth functioning. The utilities are given below:<\/p>\n
\n- Text editor: It is used for creating and editing text files.<\/li>\n
- Backup utility: Creating a copy of files in another location to protect them against loss, if your hard disk fails or you accidentally overwrite or delete data.<\/li>\n
- Compression Utility: It is used to reduce the size of a file by using a program and can be restored to its original form when needed.<\/li>\n
- Disk Defragmenter: It is used to speeds up disk access by rearranging the files-that ar& stored in different locations as fragments to contiguous memory and free space is consolidated in one contiguous block.<\/li>\n
- Virus Scanner: It is a program called antivirus software scans the disk for viruses and removes them if any virus is found.<\/li>\n<\/ol>\n
Question 8.
\nRedraw the following flow chart by correcting mistakes.
\n
\nAnswer:
\n<\/p>\n
Question 9.
\nClassify the following into valid and invalid literals and give reason for invalid literals.
\n33,000+410. 5.6E82
\nAnswer:
\n33,000 – Invalid since comma cannot be allowed.
\n+410 – Invalid since real part missing.
\n5.6E – Invalid since exponent part missing.
\n82 – Valid<\/p>\n
Question 10.
\nConsider a = 5 and b = 2 and find the result of the following expressions.
\na) a>b
\nb) a! = b&&b>a
\nAnswer:
\na) a> b = 5 > 2
\nIt returns true
\nb) a!=b && b>a
\n5!=2 && 2>5
\ntrue && false
\nso It returns false.<\/p>\n
Question 11.
\nWrite short note on any two statements in C++.
\nAnswer:
\nStatements: Statements are smallest executable unit of a programming language. Each and every statement must be end with semicolon(;).
\n1. Declaration statement: Each and every variable must be declared before using it.
\nEg: int age;
\n2. Assignment,statements: Assignment operator is used to assign the value of RHS to LHS.
\nEg: X=100;
\n3. Input statements: lnput(>>) operator is used to perform input operation.
\nEg. cin>>n;
\n4. Output statements: output(<<) operator is used to perform output operation.
\nEg: cout<<n;<\/p>\n
Question 12.
\nBriefly explain type promotion with suitable example.
\nAnswer:
\nImplicit type conversion-: This is performed by C++ compiler internally. C++ converts all the lower sized data type to the highest sized operand. It is known as type promotion. Data types are arranged lower size to higher size is as follows.<\/p>\n
unsigned int(2 bytes), int(4 bytes),long (4 bytes), unsigned long (4 bytes), float(4 bytes), double(8 bytes), long double(10 bytes)<\/p>\n
Question 13.
\nWrite the equivalent switch statement for the following.
\nIf (ch= = \u2018P\u2019)
\ncout<<\u201cPass\u2019\u201d
\nelse If (ch= =\u2018F\u2019)
\ncout<<\u201cFailed\u201d;
\nAnswer:
\nswitch(ch)
\n{
\ncase \u2018P\u2019:cout<<\u201cPass\u201d;
\nbreak;
\ncase \u2018F\u2019: cout<<\u201cFailed\u201d;
\n}<\/p>\n
Question 14.
\nDefine the terms given below.
\na) Bandwidth
\nb) Noise
\nAnswer:
\na) Bandwidth: The maximum amount of data that can be transmitted by the medium measured in Hertz.
\nb) Noise: It is the unwanted electrical or electro-magnetic interferences that adversely affect the transmitted data signals.<\/p>\n
Question 15.
\nName any four basic elements for data communication:
\nAnswer:
\nCommunication is the exchange of information between two human beings. But data communication is the exchange of, information between two computers (devices).<\/p>\n
\n- Message: It is the data\/information to be transmitted from one computer to another.<\/li>\n
- Sender: It is a computer or a device that sends data. It is also called source or transmitter.<\/li>\n
- Receiver: It is a computer or a device that receives data.<\/li>\n
- Medium: It is the path through which message transmitted from the sender to the receiver. There are two types Guided and Unguided media.<\/li>\n
- Protocol: The rules and conventions for transmitting data.<\/li>\n<\/ul>\n
Question 16.
\nWrite two advantages of Electronic Payment System (EPS).
\nAnswer:
\nElectronic Payment System (EPS): It is also called plastic money that is electronically exchange money between two individuals or firms (buyers and sellers) in an online environment.<\/p>\n
Part – C<\/span><\/p>\nAnswer any 9 questions from 17 to 27. Each carries 3 scores each. (9 \u00d7 3 = 27)<\/span><\/p>\nQuestion 17.
\nIf (X)16<\/sub> = (Y)10<\/sub> = (Z)8<\/sub> = (11111111 )2<\/sub> find the values of X, Yand Z.
\nAnswer:
\n1) To find the value X, i.e. hexadecimal equivalent, divide the binary number into groups of 4 bits and write down the corresponding hexadecimal equivalent.
\n<\/p>\n2) To find the value Y, i.e. decimal equivalent, multiply each digit by its corresponding weightage and simply sum it up.
\n1*27<\/sup>+1*26<\/sup>+1*25<\/sup>+1*24<\/sup>+1*23<\/sup>+1*22<\/sup>+1*21<\/sup>+1*20<\/sup>
\n=128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
\n= 255
\nHere Y = 255<\/p>\n3) To find the value Z, i.e. octal equivalent, divide the binary number into groups of 3 bits and write down the corresponding octal equivalent.
\n<\/p>\n
Question 18.
\nWhat is e-waste? Explain any two e-waste disposal methods.
\nAnswer:
\ne-waste(electronic waste): It refers to the mal functioning electronic products such as faulty computers, mobile phones, tv sets, toys, CFL etc.<\/p>\n
e-waste disposal methods:<\/p>\n
\n- Reuse: Reusability has an important role of e-waste management and can reduce the volume of e-waste<\/li>\n
- Incineration: It is the process of burning e-waste at high temperature in a chimney<\/li>\n
- Recycling of e-waste: It is the process of making new products from this e-waste.<\/li>\n
- Landfilling: It is used to level pits and cover by thick layer of soil.<\/li>\n<\/ol>\n
Question 19.
\nWrite an algorithm to find the numbers from 1 to 10.
\nAnswer:
\nStep 1 : Start
\nStep 2 : Set i=1.
\nStep 3 : if i>10 go to Step 6
\nStep 4 : Print i.
\nStep 5 : Set i=i+1 go to Step 3.
\nStep 6 : Stop.<\/p>\n
Question 20.
\nExplain any two types of programming errors.
\nAnswer:
\nIn general there are two types of errors syntax errors and logical errors. When the rules or syntax of the language are not followed then syntax errors occurred and it is displayed after compilation. When the logic of a program is wrong then logical errors occurred and it is not displayed after compilation but it is displayed in the execution and testing phase.<\/p>\n
Question 21.
\nConsider the following diagram answer the question.
\n
\nWrite the base address (L-value), content (R-value) and Name of variable.
\nAnswer:
\nBase address (L-value) – 3000
\nContent (R-value) – 105
\nName of variable – NUM<\/p>\n
Question 22.
\nWrite short notes on:
\na) Preprocessor directive
\nb) Header file
\nc) Main () function
\nAnswer:
\na) Preprocessor directives: A C++ program starts with the preprocessor directive i.e., # include, #define, #undef, etc, are such a preprocessor directives. By using #include we can link the header files that are needed to use the functions. By using #define we can define some constants. Eg. #define x 100.<\/p>\n
b) header files: A header file is a prestored file that helps to use some operators and functions. To write C++ programs the header files are must.<\/p>\n
Following are the header files<\/p>\n
\n- iostream<\/li>\n
- cstdio<\/li>\n
- cctype<\/li>\n
- cmath<\/li>\n<\/ul>\n
c) The main function: The main function is the first function which is invoked at the time of execution and the program ends within main(). The other functions are invoke from main().<\/p>\n
Question 23.
\nWhat is the use of type modifiers in C++? List any four type modifiers.
\nAnswer:
\nType modifiers: With the help of type modifiers we can change the sign and range of data with same size. The important modifiers are signed, unsigned, long and short.<\/p>\n
Question 24.
\nWrite a C++ program to input an integer and check whether it is positive, negative or zero.
\nAnswer:
\n#include<iostream>
\nusing namespace std;
\nint main()
\n{
\nint n;
\ncout<<\u201cEnter a number\u201d;
\ncin>>n;
\nif(n>0)
\ncout<<\u201cThe number is positive\u201d;
\nelse if(n<0)
\ncout<<n<<\u201cThe number is negative\u201d;
\nelse
\ncout<<n<<\u201cThe number is zero\u201d;
\n}<\/p>\n
Question 25.
\nCompare Dial-up connection and wired broadband connection.
\nAnswer:<\/p>\n
\n\n\nDial-up Connection<\/td>\n | Broadband connection<\/td>\n<\/tr>\n |
\n1. Requires dialing to ISP<\/td>\n | 1. Always on connection<\/td>\n<\/tr>\n |
\n2. Slow speed<\/td>\n | 2. High speed<\/td>\n<\/tr>\n |
\n3. Error rate is low<\/td>\n | 3. Error rate is high<\/td>\n<\/tr>\n |
\n4. Uses dial-up modem<\/td>\n | 4. Uses broadband modem<\/td>\n<\/tr>\n |
\n5. Exclusive telephone line needed<\/td>\n | 5. Simultaneously transmit voice and data<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Question 26. \na) Consider the following e-mail address and write the user name and domain name of it. myschool@gmail.com \nb) List any four advantages of e-mail. \nAnswer: \na) Username – myschool \nDomain name – gmail.com<\/p>\n b) The advantages of e-mail are given below:<\/p>\n \n- Speed is high<\/li>\n
- It is cheap<\/li>\n
- We can send email to multiple recipients<\/li>\n
- Incoming messages can be saved locally<\/li>\n
- It reduces the usage of paper<\/li>\n
- We can access mailbox anytime and from anywhere.<\/li>\n<\/ul>\n
Question 27. \nExplain any three IT-enabled services. \nAnswer: \n1. e-Governance: The integration of computers and communication technology for the benefit of government functions to the public is termed as e-Govemance by this government can serve the public in a convenient, efficient and transparent manner.<\/p>\n 2. e-business(electronic Business): Providing services or running business through internet is called e-business.<\/p>\n 3. e-Learning: It is the use of electronic media (It includes text, audio, video, image, animation, etc), educational technology. (It includes Satellite TV, CD ROM, Computer Based Learning, etc) and information and communication technologies (ICT – it uses intranet\/extranet and web-based learning) in education.<\/p>\n Part – D<\/span><\/p>\nAnswer any 2 questions from 28 to 30. Each carries 5 scores each. (2 \u00d7 5 = 10)<\/span><\/p>\nQuestion 28. \n\u201cOpen source softwares are getting more popularity all over the world today.\u201d \na) Write the full form of FSF. \nb) Briefly elaborate four freedoms of open source softwares. \nc) Give four examples of open source softwares. \nAnswer: \na) Free Software Foundation<\/p>\n b) The Four freedoms are \ni) Freedom 0 : To run program for any purpose \nii) Freedom 1 : To study how it works and allows you to adapt according to your needs. Also allows to access source code. \niii) Freedom 2 : Allows to take copies and distribute \niv) Freedom 3 : Allows you to change source code and release the program.<\/p>\n c) Examples for Free and open source software are given below:<\/p>\n |