c language for nielit olevel
Friday, 17 May 2019
Wednesday, 1 May 2019
ch - command line argument
What is command line argument ? Also explain how to pass command line arguments to „C‟ program
Arguments that take input by user before running a program are called A) Main function arguments B) Main arguments C) Command-line arguments D) Parameterized arguments
Arguments that take input by user before running a program are called
A) Main function arguments
B) Main arguments
C) Command-line arguments
D) Parameterized arguments
Arguments that take input by user before running a program are called A) Main function arguments B) Main arguments C) Command-line arguments D) Parameterized arguments
ch- file
file
End of file is detected by
A) fend()
B) endf()
C) EOF
D) FEND
b) What is a file in C? Discuss various modes in which a file can be opened. Also discuss types of files.
true/false
While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters. FALSE
If the file to be included doesn‟t exist, the preprocessor flashes an error message. TRUE
Using fprintf function, we can print on the standard output device.
fill in the blank:
Function ___(E) fputs________ writes a line to a specified file
Write a „C Program to copy test of one file to another file.
Explain the difference between Text Mode and Binary Mode files
Explain the difference between Test mode and Binary mode files.
End of file is detected by
A) fend()
B) endf()
C) EOF
D) FEND
b) What is a file in C? Discuss various modes in which a file can be opened. Also discuss types of files.
true/false
While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters. FALSE
If the file to be included doesn‟t exist, the preprocessor flashes an error message. TRUE
Using fprintf function, we can print on the standard output device.
fill in the blank:
Function ___(E) fputs________ writes a line to a specified file
Write a „C Program to copy test of one file to another file.
Explain the difference between Text Mode and Binary Mode files
Explain the difference between Test mode and Binary mode files.
ch- Link List
link list
Write a program to add a new node to the beginning of a linked list and to the end of inked list.
Which are the demerits of linked list data structure?
true/false
A linked list is a linear data structure where each element is a separate object. TRUE
It is better to use array than a linked list, when there is a fixed size list in a program.
Define array and link list. Give one example for each showing its usage.
fill in the blank
___link list_____ data structure facilitates to insert and delete data during the program execution.
Write a program to add a new node to the beginning of a linked list and to the end of inked list.
Which are the demerits of linked list data structure?
true/false
A linked list is a linear data structure where each element is a separate object. TRUE
It is better to use array than a linked list, when there is a fixed size list in a program.
Define array and link list. Give one example for each showing its usage.
fill in the blank
___link list_____ data structure facilitates to insert and delete data during the program execution.
ch- structure
structure
In ____union_____ all elements are stored in the same memory location.
We must use __dot______ symbol to access structure members.
true/false
A union cannot be nested in a structure FALSE
size of a pointer, which points to a structure, depends on size of a structure.
2.7 All the members of a union share the same memory location.
question
Write a „C‟ program to store information (title, author, subject and book_id) of a Book using structure and display it in appropriate format
Write a C program to read following details of 50 students. Student Name,, Student Roll No, Class Display total number of students studying in Class “BCA”
b) Write two main differences between structure and union.
Define a structure Distance having two data members: cm and mm in integer. The program enters three variables and find which distance is the largest among them.
In ____union_____ all elements are stored in the same memory location.
We must use __dot______ symbol to access structure members.
true/false
A union cannot be nested in a structure FALSE
size of a pointer, which points to a structure, depends on size of a structure.
2.7 All the members of a union share the same memory location.
question
Write a „C‟ program to store information (title, author, subject and book_id) of a Book using structure and display it in appropriate format
Write a C program to read following details of 50 students. Student Name,, Student Roll No, Class Display total number of students studying in Class “BCA”
b) Write two main differences between structure and union.
Define a structure Distance having two data members: cm and mm in integer. The program enters three variables and find which distance is the largest among them.
ch- Storage Class
a) Declaration
b) Definition
c) Function
d) Error
ans a) Declaration
Variables that are alive and active throughout the program are called _____global____ variables.
___extern_____ int fun(); - the declaration indicates the presence of a global function defined outside the current module or in another file.
Global variable is initialized to __zero______ by default
What do you understand by local, global and static variables ? Explain
(c) Compare the lifetime, Scope, Initial value and storage place of all storage classes.
Explain different storage classes available in „C‟
ch- Memory Allocation
Subscribe to:
Posts (Atom)
Index
ch-1 Introduction
-
If Statement #include<stdio.h> main() { int a=0; if(a=0) printf("a is zero"); else printf("not ...
-
memory allocation Memory allocation can be done by using keyword „create‟. FALSE malloc() allocates memory from the heap and not from the...
-
file End of file is detected by A) fend() B) endf() C) EOF D) FEND b) What is a file in C? Discuss various modes in which a file ca...