[go: up one dir, main page]

0% found this document useful (0 votes)
110 views5 pages

ACP Assignment-2021 PDF

This document contains 5 assignments for an Advanced Computer Programming course covering various C programming topics like arrays, strings, pointers, structures, unions, and file operations. Each assignment lists several questions related to the programming concept for the students to answer. The assignments cover common programming components like arrays, strings, pointers, functions, structures, unions, and file input/output. Students are to submit their responses by the given dates to their course teacher for grading.

Uploaded by

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

ACP Assignment-2021 PDF

This document contains 5 assignments for an Advanced Computer Programming course covering various C programming topics like arrays, strings, pointers, structures, unions, and file operations. Each assignment lists several questions related to the programming concept for the students to answer. The assignments cover common programming components like arrays, strings, pointers, functions, structures, unions, and file input/output. Students are to submit their responses by the given dates to their course teacher for grading.

Uploaded by

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

GOVERNMENT POLYTECHNIC AHEMEDABAD,

PROGRAMME : DIPLOMAIN COMPUTER ENGINNERING


TERM: 20/01/2020 to 20/05/2020
Course Name: Advanced ComputerProgramming
GTU code-3320702 course code-C111 Semester: 2nd

Assignment: 1 CO1

Arrays, String and Operations :


1. Explain Array with Example.

2. Explain advantages and disadvantages of an array.

3. Explain types of array.

4. Explain initialization of single and multi-dimensional array with example.

5. Explain initialization a string with example.

6. Explain all operations that can be performed on string.

7. Explain difference between scanf0 and gets().

8. Explain difference between printf0 and puts().

9. Explain difference between sscanf( )and sprintf().

10. Explain various string handling operations with example.

Assignment Date Submission Date

Course Teacher H.O.D

COMPUTER DEPARTMENT COMPUTER DEPARTMENT


GOVERNMENT POLYTECHNIC AHEMEDABAD,
PROGRAMME : DIPLOMAIN COMPUTER ENGINNERING
TERM: 20/01/2020 to 20/05/2020
Course Name: Advanced ComputerProgramming
GTU code-3320702 course code-C111 Semester: 2nd

Assignment: 2 CO2

Pointers and Features of Pointers:


1. Define pointer. Give declaration and initialization of pointer.

2. Write advantages and disadvantages of pointer.

3. Define void pointer.

4. Explain chain of pointer with example.

5. Explain array of pointer with example.

6. Show how to access array using pointer?Explain with program illustration.

7. Explain dynamic memory allocation. Write its merits and demerits.

8. Difference between malloc(), calloc(), realloc().

Assignment Date Submission Date

Course Teacher H.O.D

COMPUTER DEPARTMENT COMPUTER DEPARTMENT


GOVERNMENT POLYTECHNIC AHEMEDABAD,
PROGRAMME : DIPLOMAIN COMPUTER ENGINNERING
TERM: 20/01/2020 to 20/05/2020
Course Name: Advanced ComputerProgramming
GTU code-3320702 course code-C111 Semester: 2nd

Assignment: 3 CO3

Functions and Preprocessor Directives:


1. Explain function prototype, function definition and function call.
2. List various categories of function. Explain all with code snippet.
3. Explain call by value and call by reference with example.
4. Give difference between library function and user defined function.
5. Define recursion .demonstrate it using program.
6. Explain directives #includeand #line with one example.
7. Explain directives #define and #undef with one
example.
8. Define macro expansion.Explain with example.
9. Explain condition inclusion with example.
10. List and Explain <ctype.h> Macros.

Assignment Date Submission Date

Course Teacher H.O.D

COMPUTER DEPARTMENT COMPUTER DEPARTMENT


GOVERNMENT POLYTECHNIC AHEMEDABAD,
PROGRAMME : DIPLOMAIN COMPUTER ENGINNERING
TERM: 20/01/2020 to 20/05/2020
Course Name: Advanced ComputerProgramming
GTU code-3320702 course code-C111 Semester: 2nd
Assignment: 4 CO4

Structure and Union:


1. Explain structure with initialization and example

2. Explain array of structure with example

3. Explain union with example.

4. Give the difference between structure and union.

5. Create a structure “Employee” which contains following information like EMP_NAME,

EMPID, BASICPAY, DA, HRA, TA,DEDUCTION,GROSS_SALARY,NET_SALARY.

Write a program to insert a data of 3 employees and display it.

Assignment Date Submission Date

Course Teacher H.O.D

COMPUTER DEPARTMENT COMPUTER DEPARTMENT


GOVERNMENT POLYTECHNIC AHEMEDABAD,
PROGRAMME : DIPLOMAIN COMPUTER ENGINNERING
TERM: 20/01/2020 to 20/05/2020
Course Name: Advanced ComputerProgramming
GTU code-3320702 course code-C111 Semester: 2nd
Assignment: 5 CO5

Files Operations and Functions :

1. State the rules to initialize the structure.


2. Write syntax in C for structure named book with datafield as title,author,price and year.
3. Explain array of structure using suitable example.
4. Explain nesting of structures using example.
5. Define union. Explain with example.
6. Give difference between structure and union.
7. State the purpose of typedef. How typedef is useful in a structure?
8. Explain file management with example.
9. Explain file opening modes .
10.Write a program to copy the content of one file.
11.Explain command line arguments with example.

Assignment Date Submission Date

Course Teacher H.O.D

COMPUTER DEPARTMENT COMPUTER DEPARTMENT

You might also like