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 Computer
Application-BCA
SEMESTER
I
SUBJECT CODE & NAME
BCA112 – Programming in
C
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
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 - operator
can be used in two ways: to subtract two numbers (as in a - b), or to negate
one number (as in -a + b or a + -b).
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.
The
procedure code does not have The
procedure code gives a direct reference to the
any
access to the underlying programming
element in the calling code.
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);
if (a>b) //
check whether a is greater than b if true then
if(a>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
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
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