Categories: Uncategorized

Assignment [class 12] | Pointer | File Handling in C

POINTER

1. What is pointer? differentiate between array and pointer.
2. differentiate between structure and pointer.
3. differentiate between call by value and call by reference.
4. List operators used in pointer. Write advantages of pointer.
5. WAP to swap two numbers using pointer.
6. WAP to input 10 numbers and display them in ascending order using pointer.

FILE HANDLING IN C
MCQ
What will fopen return, if there is any error while opening file?
a) Nothing
b) EOF
c) NULL
d) Depends upon compiler

2. The presence of code like “s.t.b=10” indicates ….
a) Error
b) Structure
c) double data type
d) an ordinary vairable name.

3. What is meant by ‘a’ in the following C operation?
fp=fopen(“data.txt”,”a”);
a. attach
b. append
c. apprehend
d. add

 

Short Q/A

1. What is data file? Write syntax to open and close datafile.
2. Differentiate between sequential access and random-access techniques of data file.
3. List of File manipulation functions with syntax and example. Write function of rename() and remove() functions.

 

Long Q/A
1. Write a program to enter name, roll_no and marks of 5 students and store them in a file “student.dat” and read the records from the data file and disply the record on screen.

2. Write a progrm to store id, name and mark of n students. sort according to descending order of mark and store in datafile and display the records of datafile in proper format.

jaminrai

Recent Posts

Class XII | Assignment| Chapter 2: Data Communication and Networking

MCQ 1) … Refers to the sending, receiving and processing of information by electronic means.…

2 months ago

Class XI [Chapter 1: Computer System] Assignment

MCQ Which of the following is volatile storage? Backup b. RAM                 c. ROM                 d. Tape…

2 months ago

Class XI Chapter 2 Number system [ASSIGNMENT]

MCQ 1. We have ....... universal gatges a. 1      b. 0     c.…

2 months ago

What is Topology?

  DOWNLOAD  PDF  HERE!!!!!! topology

2 months ago

Class XII | Assignment 2 ( C Structure)

STRUCTURE (Submit after Mid Term , 15 Ashad 2083) A) MCQ 1. What is the…

3 months ago

Class XII Assignment 1 ( C Function )

FUNCTION (Assignment) Submit Before Mid Term MCQ 1. What is the output of this statement…

3 months ago