0% found this document useful (0 votes)
49 views4 pages

Dca1102 Programming in C

The document contains information about a Bachelor of Computer Applications (BCA) program for Semester I. It includes the course code and name (DCA1102 - Programming in C), number of credits (4), and number of assignments (2 worth 30 marks each). The document then provides sample questions and answers related to programming in C. It covers topics like features of the C language, flow control statements, defining functions, arrays, structures, and differences between static and dynamic memory allocation.

Uploaded by

daman.d778
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views4 pages

Dca1102 Programming in C

The document contains information about a Bachelor of Computer Applications (BCA) program for Semester I. It includes the course code and name (DCA1102 - Programming in C), number of credits (4), and number of assignments (2 worth 30 marks each). The document then provides sample questions and answers related to programming in C. It covers topics like features of the C language, flow control statements, defining functions, arrays, structures, and differences between static and dynamic memory allocation.

Uploaded by

daman.d778
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SESSION AUGUST 2023

PROGRAM BACHELOR OF COMPUTER APPLICATIONS


(BCA)
SEMESTER I
COURSE CODE & NAME DCA1102 – PROGRAMMING IN C
CREDITS 4
NUMBER OF ASSIGNMENTS 02
& MARKS 30 Marks each

SET – I

1. Describe various features of the C programming language.

Ans 1.

Features of the C Programming Language

Simplicity and Efficiency: C is known for its straightforward syntax and ease of use. While
its roots date back to the early days of computing, its simple structure has made it a staple in
modern programming. Moreover, C programs are efficient and have a fast execution time due
to their close relation to assembly Its Half solved only
Buy Complete from our online store

https://smuassignment.in/online-store/

MUJ Fully solved assignment available for session SEPT


2023.

Lowest price guarantee with quality.


Charges INR 198 only per assignment. For more
information you can get via mail or Whats app also
Mail id is [email protected]

Our website www.smuassignment.in


After mail, we will reply you instant or maximum
1 hour.
Otherwise you can also contact on our
whatsapp no 8791490301.

2. Explain various flow control statements in C with examples.

Ans 2.

Flow control in C is crucial for directing the program execution sequence based on certain
conditions. There are several flow control statements in C that include conditional statements,
looping statements, and jump statements. Let's delve into each of them:

1.

3. Define a function. List and explain the categories of user-defined functions.

Ans 3.

Defining a Function:

In programming, a function is a self-contained block of code that encapsulates a specific task


or related group of tasks. In Python, functions are defined using the def keyword. Here's a
basic example:

def greet(name):

return "Hello, " + name + "!"


In the above example, we have defined a function named greet that takes a single parameter,
name, and

SET - II

4. Define an array. How to initializea one-dimensional array? Explain with suitable


examples.

Ans 4.

Definition of an Array:

An array is a data structure that can hold more than one value at a time. It is a collection of
variables that are accessed with an index number. Each element can be accessed by its
position in the array. The majority of languages define the starting index of the array as 0.

2. Initializing

5a. Define Structure and write the general syntax for declaring and accessing members.

b. List out the differences between unions and structures.

Ans 5.

5a Structure:

Definition:

A structure (often referred to as a "struct") is a composite data type in many programming


languages that groups together variables under a single name. These variables can be of
different data types, and each of them is called a member of the structure. Structures are used
for grouping data of different types together to describe a real-world entity in a more logical
way.
General Syntax for

6. Explain the difference between static memory allocation and dynamic memory
allocation in C. Explain various dynamic memory allocation function in c.

Ans 6.

STATIC MEMORY ALLOCATION:

Definition: In static memory allocation, the memory for variables is allocated at compile
time. The size of the memory to be allocated is known beforehand and remains fixed during
the execution of the program.

Duration: Memory is allocated for the entire duration of the program's execution. Once
allocated, the memory size cannot be

You might also like