Recent questions tagged computer-science

Description : What is the difference between a sequential file and a random file?

Last Answer : Ans: Sequential file access is the method employed in tape drives where the files are access in a sequential manner. So if you have to get a file in the end of the tape you have to start ... Disks and Optical drives, wherever the files is placed it will go to that particular place and retrieve it.

Description : What do you mean by File Positioning?

Last Answer : Ans: The file positioning of a stream describes where in the file the stream is currently reading or writing. I/O on the stream advances the file position through the file. On GNU systems, the ... position is represented as an integer, which counts the number of bytes from the beginning of the file.

Description : Write the general formats for file opening and file closing commands?

Last Answer : Ans: For Opening:- fp=fopen(“filename” , “mode”); where ‘fp’ refers to the file pointer. ‘filename’ refers to the name of the file to be opened. ‘mode’ refers to the mode of accessing data. For Closing:- fclose(fp); where fp denotes the file pointer.

Description : In what way is a file more flexible than a String?

Last Answer : Ans: A file is stored permanently in a storage device.It is easy to access a file whenever required. On the other hand, a string is stored temporarily in RAM, and the contents of a string will be erased automatically when the power is switched off or when the program execution is terminated.

Description : List some of the most used File Processing functions in C?

Last Answer : Ans: Most used file processing functions in C are-  fopen()-used to open a file and set the file pointer to the beginning or end of a File.  fclose()-used to close an active File.  getc()-used ... used to write data to a File.  rewind()-used to move the file pointer to the beginning of a File.

Description : What are the operations that can be performed on Files?

Last Answer : Ans: Following operations can be performed on files1. Creation of a file of a specific type. 2. Reading/processing a file. 3. Append/add information to a file. 4. Modify/edit data in a file. 5. Delete items in a file. 6. Update the file.

Description : What are the ways of storing data in Files?

Last Answer : Ans: There are two ways of storing data in files 1. Text Format- In text format data is stored as a line of character with each line terminated by a new line character ( \n'). Text files ... different on different machine. In text format , these problem do not arise,and hence it is more portable.

Description : Why we use File Handling?

Last Answer : Ans: The input and output operation that we have performed so far were done through screen and keyboard only.After the termination of program all the entered data is lost because primary memory is volatile ... 2. Low level (system oriented files)- low level files handling is managed by system call.

Description : What do you mean by a File?

Last Answer : Ans: A File contains containsdata/information which are stored permanently in a storage device.Floppy disk and hard disk are commonly used to store file information.When large quantity data is required to ... filename normally has a primary name and a secondary name which are separated by a Dot(.)

Description : Describe the following types of application software. 

Last Answer :  Productivity Software:  They include word processing, spreadsheet and database management.  They are used to speed up daily routine tasks.  They help to work in organized and efficient ... typing tutors, spelling tutor, language learning, medical, driving test,  flight simulation etc. 

Description : Write short note on the followings.  Hardware Engineer:

Last Answer :  Hardware Engineer:  He is a person who design and manufacture computer hardware.  He also do repairing and maintenance of computers.  He has deep knowledge of computers, processors, circuit ... images and videos using various software.  He can edit, split and combine images and videos. 

Description : Explain the basic operations of a computer. 

Last Answer :  Input Operation:  A computer works in the light of instructions (input) given to it.  Input is given by a user using keyboard or mouse.  The input is stored in memory for further processing. ... on the monitor or print it on paper. Results can also be saved on hard disk for future use. 

Description : Write a note on mainframe, minicomputer and microcomputer. 

Last Answer :  Mainframe Computer:  These are very large, powerful and expensive.  They can support hundreds and thousands users at a time.  Modern mainframe computers use cutting edge technology.   ... of instructions per second.  Their examples are IBM, HP, Dell, Toshiba etc. 

Description : Describe the five generations of computers. 

Last Answer :  First Generation Computers (1940-1956):  They used vacuum tube technology.  Vacuum tubes produce lot of heat and needs to be cooled with A.C.  Their examples were ENIAC, UNIVAC-I, IBM ...  They will be based on Artificial Intelligence.  Their examples will be robots and expert systems. 

Description : What are the tasks performed by operating system? 

Last Answer :  It loads programs into memory and executes them.  It controls the operation of input/output and storage devices.  It manages files and folders.  It allows creating a password to protect computers from unauthorized use.   It detects hardware failures and displays messages to fix them. 

Description : Name few house hold appliances in which microprocessor is used. 

Last Answer :  They are being used in the devices including mobile phones, microwave ovens, cameras, washing machines, televisions, etc. 

Description : Give any three uses of computers in a school library.

Last Answer :  Access to information and primary information sources.  Network accessibility on Intranet and Internet.  User-friendly interface.  Advanced search and retrieval.  Multiple access / Universal accessibility.  Integration with other digital libraries. 

Description : How a student can use computer to improve academic performance?

Last Answer :  Using Computer Applications will:  Increase the motivation in student.  Increase the interest for learning Management.  Lead to the development of students' skills.  Develop ... different case studies  Prepares the students for the knowledge-based society and economy. 

Description : Differentiate between systems software and application software. 

Last Answer :  System Software:  It is a collection of programs which makes the use of computer easy and efficient.  Highly experienced computer programmers develop system software ... software includes productivity software, business software, entertainment software and education software. 

Description : What will happen if storage devices are removed from a computer? 

Last Answer :  If storage devices are removed from a computer then it will not possible to store the information and information retrieval. 

Description : Differentiate between analog and digital computers

Last Answer :  Analog computer:  Analog computers represent and process data by measuring quantities such as voltage and current to solve a problem.  They work on supply of continuous signals as input. ... memory capacity.  They are being used in business, education, health, supermarkets & banking. 

Description : Compare 1st and 3rd generation computers.  

Last Answer :  First Generation Computers (1940-1956):  They used vacuum tube technology.  Vacuum tubes produce lot of heat and needs to be cooled with A.C.  Their examples were ENIAC, UNIVAC-I, ... Their examples were Burroughs 6700, IBM System / 360, System 3 and Control Data Corporations 3300 and 6600.

Description : Describe Napier’s Bone and Slide Rule. 

Last Answer :  Napier's Bone:  It was a calculating device invented by John Napier (Scottish Mathematician) in 1614.  It consisted of a wooden box containing rotating cylinders having digits from 0-9.  ... solve problem of multiplications and divisions.  It has 3 parts. Slide, Rule and Sliding Cursor. 

Description : What is the purpose of Ctrl + I shortcut key in MS - Word: a) It converts selected text into the next larger size of the same font. b) It applies the Italic formatting to the selected text. c) It makes the selected text bold d) It adds a line break to the document. e) None of The Above

Last Answer : b) It applies the Italic formatting to the selected text.

Description : Which of the following cloud concept is related to pooling and sharing of resources? a) Polymorphism b) Abstraction c) Virtualization d) None of the mentioned

Last Answer : Virtualization

Description : ____________is the delivery of on-demand computing services, from applications to storage and processing power, typically over the internet and on a pay-as-you-go basis. a) Cloud computing b) Cloud Infrastructure c) Distributed system d) None of these

Last Answer : Cloud computing

Description : What is the difference between Call by value and Call by reference?

Last Answer : A: Call By Value : When a function is called by value, then the value of the actual parameter is copied to the formal parameter (i.e. a separate copy is made). Any changes made with the ... with the values at that address of the formal parameter affects (changes) the value of the actual parameter.

Description : What are the different types of complexities?

Last Answer : A: Time Complexity (Temporal COmplexity) : The measure of the total amount of computer time taken to run for completion of an algorithm is known as time complexity. Space Complexity: The measure ... amount of memory space needed to run for completion of an algorithm is known as space complexity.

Description : What is complexity?

Last Answer : A: Complexity refers to the measure of the performance of an algorithm.

Description : What is super constructor?

Last Answer : A: It is a constructor which is used to call the constructor of the super class and hence initialize the data members of the super class from within the sub class.

Description : What is super keyword?

Last Answer : A: It is a keyword which is used to access the data members and methods of the super class from within the sub class.

Description : What is an interface? How is it useful?

Last Answer : A: Interface is like a class that contains declaration of methods and variables without the function definition. It helps in implementing multiple inheritance.

Description : What error will be generated if a space is given between the logical AND operator (&&)? Will it be a compile-time or a run-time error?

Last Answer : Example: if(5>2 & & 6

Description : What is the difference between naming conventions and naming rules?

Last Answer : A: Violating naming rules will result in a syntax error, whereas, violating naming conventions will not result in any error.

Description : What is the similarity between a method and a constructor?

Last Answer : A: Below are some of the similarities: 1) Both of them are member methods of any class. 2) Both can be parameterised or non-parameterised. 3) Both can be overloaded.

Description : What is the difference between keywords and reserved words?

Last Answer : A: Keywords have a special meaning in a language, and are part of the syntax. Reserved words are words that cannot be used as identifiers (variables, functions, etc.), because they are reserved by the ... goto is a reserved word but not a keyword (as a consequence, you cannot use it at all)

Description : What is an abstract method?

Last Answer : A: An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this: abstract void point(double x, double y);

Description : What is an abstract class?

Last Answer : A: An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.

Description : What is a stack? State it’s application.

Last Answer : A: It is a linear data structure which follows the LIFO (Last In First out) pattern. Stack memory is used in recursion. Application: It can be used for reversing strings, for evaluating postfix expressions.

Description : What is a queue? Give a real life example.

Last Answer : A: It is a linear data structure which follows the FIFO (First In First out) pattern. Real life example: Queue at the ticket counter

Description : What is the difference between linear and binary search?

Last Answer : A: Linear search does not require the array to be sorted, whereas, binary search requires that the array be sorted. Linear search checks for the search item in a linear fashion from the beginning cell till the end, ... tell what is control variable in your loop. So if your loop is for(int i = 1; i

Description : When does Binary search fail?

Last Answer : A: When the array is not sorted.

Description : What is the drawback of an array?

Last Answer : A: Its size cannot be changed.

Description : What is the difference between selection sort and bubble sort?

Last Answer : A: In selection sort, successive rounds are executed to select the element which is required to be placed in their sorted position, whereas, in bubble sort, every consecutive pairs of elements are compared ... element at every pass, whereas, in bubble sort we get the largest element in every pass.

Description : What is the difference between break and continue?

Last Answer : A: break keyword stops the complete loop and takes the control out of the loop, whereas, the continue keyword just stops the current iteration and takes the control to the next iteration.

Description : What is the difference between length() and length?

Last Answer : A: length() function is used to find the number of characters present in a String, whereas, length keyword is used to find the number if cells in an array.

Description : What is the use of charAt() function?

Last Answer : A: This function is used to extract characters at any given index from a String.

Description : What is split() function?

Last Answer : A: split() function is a function of the String class and it breaks up any String into tokens and outputs the result in the form of an array.

Description : Name some other concepts related to Scanner/StringTokenizer

Last Answer : A: Scanner class, StringTokenizer class, split() function.

Description : Name some function of Scanner class.

Last Answer : A: next(), nextInt(), hasNextInt() etc.