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

 

 

ASSIGNMENT

PROGRAM BCA
SEMESTER FIRST
SUBJECT CODE & NAME BCA1020- 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

 

 

 

  1. 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);

 

 

 

 

  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 (

 

 

 

  1. 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 reference, using the ref or out keyword.

A variable of a reference type does not

 

 

  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 details regarding the permission,  right and authorization such as using Discretionary Access Control List (DACL) and
  • Security Access Control List (SACL)

 

Dear students get fully solved assignments

Send your semester & Specialization name to our mail id :

“ help.mbaassignments@gmail.com ”

or

Call us at : 08263069601

 

Leave a Reply