comprehensive viva questions for cse with answers pdf
#1

hi
i request u to give dbms comprehensive viva bits and answers
thanks
Reply
#2
comprehensive viva questions for cse with answers pdf

Q1. What do you mean by a File?

Ans: A File contains contains data/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 be stored and processed, the concept of file is used.

A file stored in a storage device is always identified using a file name(e.g. STUDENT.DAT).

Note:- A filename normally has a primary name and a secondary name which are separated by a Dot(.)

CS Jobs

Computer Science

Q2. Why we use File Handling?

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 . if the data has to be used later ,then it becomes necessary to keep it in permanent storage device. so the c language provide the concept of file through which data can be stored on the disk or secondary storage device.The stored data can be read whenever required.

Types of File Handling in C:
The file handling in C can be categorized in two types-

High level (Standard files or stream oriented files)- High level file handling is managed by library function. High level file handling is commonly used because it is easier and hide most of the details from the programmer.
Low level (system oriented files)- low level files handling is managed by system call.
Q3: What are the ways of storing data in Files?
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 are in human readable form and they can be created and read using any text editor.

2. Binary Format– In binary format, data is stored on the disk same way as it is represented in the computer memory.Binary files are not in human readable form they and can be created and read by a specific program written for them .The binary data stored in the file can’t be read by any editor.

The input and output operation in binary files take less time as compared to that of the text files because in binary files no conversion have to take place .However the data written using binary format is not very portable since the size of data types and byte order may be different on different machine. In text format , these problem do not arise,and hence it is more portable.

Q4: What are the operations that can be performed on Files?
Ans: Following operations can be performed on files-

Creation of a file of a specific type.
Reading/processing a file.
Append/add information to a file.
Modify/edit data in a file.
Delete items in a file.
Update the file.
Q5: What are the measures that can be adopted to avoid errors in File Processing?
Ans: Following are the measures that can be adopted to avoid errors in file processing-

ferror() function can be used to detect any error during file accessing.This function will return a zero when there is no error or vice-versa.
FILE *fptr
if(ferror(fptr)==0)
printf(“\n The file is available for processing”);
else
printf(“\n Error in accessing file”);

To verify whether a file exists in the disks,the following definitions will help.
if(fptr==NULL)
printf(“\n No content or file does not exist”);

Q6: List some of the most used File Processing functions in C?
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 to read a character in a File.
putc()-used to write a character to a File.
putw()-used to write an integer data to a File.
fscanf()-used to read data from a File.
fprintf()-used to write data to a File.
rewind()-used to move the file pointer to the beginning of a File.
Q7: In what way is a file more flexible than a String?
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.

Q8: Write the general formats for file opening and file closing commands?
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.

Q9: What do you mean by File Positioning?
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 file position is represented as an integer, which counts the number of bytes from the beginning of the file.

Q10: What is the difference between a sequential file and a random file?
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 from the beginning till it reaches the beginning of the files…
Random access files are similar to the one in Hard Disks and Optical drives, wherever the files is placed it will go to that particular place and retrieve it.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: project viva questions and answers for cse torrenttechnology affecting students, mini project viva questions and answers for cse, ap peset cse previous questions and answers pdf download, comprehensive viva questions for cse with answers r09 jntuh, comprehensive vaiva of cse pdf, project viva questions and answers for cse torrent, comprehensive viva questions for cse with answers pdf,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  pdf k53 learners test questions and answers 2015 pdf 2 11,123 18-05-2018, 06:21 PM
Last Post: Guest
  viva question answer of flywheel experiment pdf 2 3,729 22-02-2018, 03:12 PM
Last Post: Guest
  aradhya tutorials compiler design notes 6th sem cse pdf 2 1,354 02-07-2017, 06:27 PM
Last Post: Guest
  surveying 2 lab viva questions with answers pdf free download 3 1,386 26-04-2017, 09:47 AM
Last Post: jaseela123d
  physics practical viva questions for bsc 4 1,946 15-02-2017, 02:06 PM
Last Post: jaseela123d
  cp7102 2 marks with answers 2 782 27-09-2016, 02:48 PM
Last Post: Guest
  questions asked in viva on topic inventory management 2 1,119 23-07-2016, 02:55 PM
Last Post: jaseela123d
  tata steel intern techniqal questions pdf 1 786 23-07-2016, 10:37 AM
Last Post: visalakshik
  automatic toll collection system using rfid viva questions 2 922 23-07-2016, 10:10 AM
Last Post: jaseela123d
  pgcet question papers for cse of gujarat 2 865 22-07-2016, 03:04 PM
Last Post: visalakshik

Forum Jump: