Boost PC performance: How more available memory can improve productivity
Mca1020 programming in c
1. Dear students get fully solved SMU MBA Spring 2014 assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
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 Define operators. Briefly explain about any four Operators in C.
Answer: - Operators are the symbol which operates on value or a variable. For example: + is a operator
to perform addition programming language has wide range of operators to perform various operations.
For better understanding of operators, these operators can be classified as:
Q.2 Differentiate between formal parameters and actual parameters with example.
Answer:- Actual Parameters : Subprograms pass information using parameters. The variables or
expressions referenced in the parameter list of a subprogram call are actual parameters. For example,
the following procedure call lists two actual parameters named emp_num and amount. Actual
parameters are parameters as they appear in function calls.
Eg. raise_salary(emp_num, amount);
2. Q.3 Describe about static and external variables.
Answer: - External variables have global scope across the entire program (provided extern declarations
are used is files other than where the variable is defined), and a lifetime over the the entire program
run. The storage class, static, similarly provides a lifetime over the entire program, however; it provides
a way to limit the scope of such variables, and Static storage class is declared with the keyword static as
the class specifier when the variable is defined. These variables are automatically initialized to zero upon
memory allocation just as external variables are. Static storage class can be specified for automatic as
well as external variables.
Q.4 Distinguish between pass by value and pass by reference with the help of an example.
Answer: - When passing parameters, what it is called and what happens can be confusing. It is less
essential that you call it the "correct" thing than you know exactly what is happening. It is critical to have
a good mental model, a valid memory picture of the process.
Recall that when you call a function, a chunk of memory called an activation record is allocated. Critical
to the discussion here is that this memory holds the formal parameter values and function local
variables.
Q.5 Define macro. How can we 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
Q.6 What is the use of fopen () and fclose () function? List and explain different modes for opening a
file.
Answer: - fopen function ():- This function is used to open the file.
Dear students get fully solved SMU MBA Spring 2014 assignments
Send your semester & Specialization name to our mail id :