An open API service indexing awesome lists of open source software.

https://github.com/pabitra-33/assignment_c

Completed all the task given by my faculty in classroom for practicing.
https://github.com/pabitra-33/assignment_c

Last synced: 7 months ago
JSON representation

Completed all the task given by my faculty in classroom for practicing.

Awesome Lists containing this project

README

          

# C_Programming Assignment:

# Description
This assignments involves solving several programming problems using the C language.
The problems are designed to test my understanding of fundamental concepts in C programming, including data types, control structures, functions, pointers, arrays, and strings.

# Assignment Questions:

# Question 1: Fibonacci Number
Write a function fibonacci that takes an integer n as a parameter and returns the nth Fibonacci number.

The Fibonacci sequence is defined as:

. F(0) = 0

. F(1) = 1

. F(n) = F(n-1) + F(n-2) for n > 1

# Question 2: Print Alphabets
Write a function alphabets that takes two characters c1 and c2 and prints all the alphabets starting from c1 to c2 in a single line.

Input: There is no input for this task.

Output: The program should print the alphabets from 'c1' to 'c2'.

# Question 3: Substring Extraction
Write a function substring that takes a string s and two integers L and R, and returns the substring of s from index L to R.
Input:

A string s of length n (1 ≤ n ≤ 10^6).

Two integers start and end (0 ≤ start < end ≤ n).

Output:

Print the extracted substring.

# Question 4: Prime Factorization
Write a function printPrimeFactorization that takes an integer N and prints its prime factorization.
Prime factorization of a number is the process of breaking down into a product of prime numbers. The prime factors of are the prime numbers that divide exactly, without leaving a remainder.

# Question 5: Update Variable
Write a function updateVar that takes a pointer to an integer and increments the value of the integer by 10.

# Question 6: Special Array
Write a function isArraySpecial that takes an array of integers and checks if every pair of adjacent elements contains numbers with different parity.

# Question 7: Transpose of a Matrix
Write a function transpose that takes an N x N matrix and returns its transpose.

# Instructions:

. Clone the repository or download the files.

. Implement each function in the corresponding C file.

. Ensure your code is properly commented and follows good coding practices.

. Compile and test your code using a C compiler.

. Submit your completed assignment as per the submission guidelines provided.

# How to Run the Code:

1. Open a terminal or command prompt.

2. Navigate to the directory containing your C files.

3. Compile your code using a C compiler (e.g., 'gcc').

Ex: sh

gcc -o output_file_name source_file.c

4. Run the compiled program.

Ex: sh

./output_file_name

# Submission Guidelines

. Ensure all your code is working correctly.

. Zip your project files including all source code and the README file.

. Submit the zipped file through the designated submission platform.