Get fully solved assignment. Buy
online from website
online store
or
plz drop a mail with your sub
code
we will revert you within 2-3
hour or immediate
Charges rs
125/subject
DRIVE SPRING 2017
PROGRAM Bachelor of Science
in Information Technology - B.SC(IT)
SEMESTER I
SUBJECT CODE & NAME
BIT104 – Principles of C programming
Assignment Set -1
1 What is the basic structure of C
Program?
Answer: Structure of C Program
i) Starting of
main function
The compulsion
function is the main function that would be done as program for addition of two
integer numbers void main()
{
ii) Variable
declaration
To declare
variable we must have the awareness of variable name convention, data type and
syntax for
2 Explain different type of Arithmetic
Operators in C.
Answer: The basic operators for performing arithmetic are
the same in many computer languages:
+ addition
- subtraction
*
multiplication
/ division
% modulus (remainder)
The –
3 Distinguish between pass by value and
pass by reference with the help of an example.
Answer: Difference
between pass by value and pass by reference.
Pass by Value Pass
by Reference
Passes
an argument by value. Passes
an argument by reference.
Specifying
the ByVal keyword. Specifying
the ByRef keyword.
Assignment Set -2
1 a) Write a program to print the largest
of three numbers.
b) Write a program to find the factorial
of a number.
Answer: a.
Program to print the largest of three numbers
#include<stdio.h>
main()
{
int a,b,c,big;
printf (“Enter
three numbers”);
scanf (“%d %d
%d”, &a, &b, &c);
2 Define macro. How we can declare a
macro statement? Explain with an example.
Answer: A preprocessor line of the form
#define name text
defines a macro with the given name, having as
its value the given replacement
text. After that (for the rest of the current source file), wherever the
preprocessor sees that name, it will replace it with the replacement text. The
name follows the same rules as ordinary identifiers (it can contain only letters,
digits, and underscores, and may not begin with a digit). Since macros behave
quite differently from
3 Explain different functions in C to
handle Error during I/O operations.
Answer: The standard I/O functions maintain two indicators
with each open stream to show the end-of-file and error status of the stream.
These can be interrogated and set by the following functions:
#include
<stdio.h>
void clearerr(
Get fully solved assignment. Buy
online from website
online store
or
plz drop a mail with your sub
code
we will revert you within 2-3
hour or immediate
Charges rs
125/subject
No comments:
Post a Comment