Get fully solved assignments by mailing semester details
1. Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
ASSIGNMENT
PROGRAM MCA
SEMESTER FIRST
SUBJECT CODE & NAME MCA1020- PROGRAMMING INC
CREDIT 4
BK ID B1639
MAX.MARKS 60
Note:Answer all questions.Kindlynote that answersfor 10 marks questionsshouldbe approximately
of 400 words. Each questionis followedbyevaluationscheme.
Q.1. Explainthe history ofC language. What are the advantages ofC language?
Answer:- History of C language:- The C programming language was devised in the early 1970s by Dennis
M. Ritchie anemployeefromBell Labs(AT&T).
In the 1960s Ritchie worked, with several other employees of Bell Labs (AT&T), on a project called
Multics. The goal of the project was to develop an operating system for a large computer that could be
used by a thousand users. In 1969 AT&T (Bell Labs) withdrew from the project, because the project
could not produce an economically useful system. So the employees of Bell Labs (AT&T) had to search
for anotherprojecttowork on(mainlyDennisM.Ritchie
Q.2. Write short notes on:
a) scanf()
2. b) printf()
Answer:- scanf():- The C library function int scanf(const char *format, ...) reads formatted input from
stdin.
Declaration
Followingisthe declarationforscanf() function.
Q. 3. Describe about static and external variables.
Answer:- Lifetime of a static variables is throughout a program but its accessibility within the function in
which it is declared. External variables are global variables. it can be accessed in any function within a
program or out side of the program.
external variables:- In the C programming language, an external variable is a variable defined outside
any function block. On the other hand, a local (automatic) variable is a variable definedinside a function
block.
Q.4. Distinguishbetweenpassby value and pass by reference withthe helpof an example.
Answer: - A value-type variable contains its data directly as opposed to a reference-type variable, which
contains a reference to its data. Therefore, passing a value-type variable to a method means passing a
copy of the variable to the method. Any changes to the parameter that take place inside the method
have no affect on the original data stored in the variable. If you want the called method to change the
value of the parameter,youhave to passit by
Q. 5 Define macro. How we can declare a macro statement?Explain with an example.
Answer:- A Macro is typically an abbreviated name given to a piece of code or a value. Macros can also
be definedwithoutanyvalue orpiece of code butin that case theyare usedonlyfortestingpurpose.
DefiningMacros without values
The most basic use of macros is to define them without values and use them as testing conditions. As an
example,letslookatthe followingpieceof code :
Q. 6 What is the use of fopen () and fclose () function? List and explain different modes for opening a
file.
3. Answer:- OpeningAnd ClosingA Disk File
Before we dive into the details, take note that the program examples presented here just for
basicfile I/OthatappliestoDOS and Linux.
For Windows, you have to study the Win32 programming that provides specifics file I/O and
otherrelatedfunctions.Here we donotdiscussin
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )