Tuesday, 27 March 2018

BCA112 – Programming in C


Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601

DRIVE
fall 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 must have the awareness of variable name convention, data type and syntax for declaration etc. int a,b,c;
Or


2 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



3 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 (



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>


2 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 <

3 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

Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601



No comments:

Post a Comment