Skip to content

irenXerex/c

Repository files navigation

C Programming


Creating "get_line" function from scratch
get_line() is a void function that gets input of a certain length from input stream by user. The function will read in input until EOF or \n is encountered.
Perimeter and Area of a Rectangle Program
Wrote 2 functions that return the perimeter and area of a rectangle, given the length and width as parameters.
Hacker Rank Greatest of 4 inputs.
Create a program that takes 4 given integer arguments and returns the largest to the user.
Hacker Rank Sum and Differences using Scanf
Your task is to take two numbers of int data type, two numbers of float data type as input and output their sum.
  1. Declare variables: two of type int and two of type float.
  2. Read lines of input from stdin (according to the sequence given in the 'Input Format' section below) and initialize your variables.
  3. Use the and operator to perform the following operations:
    • Print the sum and difference of two int variable on a new line.
    • Print the sum and difference of two float variable rounded to one decimal place on a new line.
Pointers in C
In this challenge, you will learn to implement the basic functionalities of pointers in C. A pointer in C is a way to share a memory address among different contexts (primarily functions). They are primarily used whenever a function needs to modify the content of a variable that it does not own.
K&R Temperature Conversion
Write a program that prints the conversion of fahr -> celsius.
HackerRank conditional statements.
Given a positive integer n, if n is between 1 and 9 (inclusive), print the number in text form. Otherwise print whether the number is greater than 9.
Playground / Warmup area.
C playground used to practice
Feet to Inches
Simple Conversion from feet to inches using functions and print formatting.
Let's Manage Memory
Practice Managing Memory using pointers, to fully grasp the concept