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

(Prefer mailing. Call in emergency )

 

ASSIGNMENT

PROGRAM MCA
SEMESTER FIRST
SUBJECT CODE & NAME MCA1020- PROGRAMMING IN C
CREDIT 4
BK ID B1639
MAX.MARKS 60

 

Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme.

Q.1. Explain the history of C language. What are the advantages of C language?

Answer:- History of C language:- The C programming language was devised in the early 1970s by Dennis M. Ritchie an employee from Bell 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 another project to work on (mainly Dennis M. Ritchie

 

 Q.2. Write short notes on:

  1. a) scanf()
  2. b) printf()

Answer:- scanf():- The C library function int scanf(const char *format, …) reads formatted input from stdin.

Declaration

Following is the declaration for scanf() function.

 

  1. 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 defined inside a function block.

 

Q.4. Distinguish between pass by value and pass by reference with the help of 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, you have to pass it by

 

  1. 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 defined without any value or piece of code but in that case they are used only for testing purpose.

Defining Macros without values

The most basic use of macros is to define them without values and use them as testing conditions. As an example, lets look at the following piece of code :

 

  1. 6 What is the use of fopen () and fclose () function? List and explain different modes for opening a file.

Answer:- Opening And Closing A Disk File

  • Before we dive into the details, take note that the program examples presented here just for basic file I/O that applies to DOS and Linux.
  • For Windows, you have to study the Win32 programming that provides specifics file I/O and other related functions. Here we do not discuss in

 

 

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 )

 

Leave a Reply