BIT104 – Principles of C programming


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 Science in Information Technology - B.SC(IT)
SEMESTER I
SUBJECT CODE & NAME BIT104 – Principles of C programming

Assignment Set -1
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>


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


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



Assignment Set -2
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)


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 (


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


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

Note: Only a member of this blog may post a comment.