Skip to content

Vortex-16/STCET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘¨πŸΌβ€πŸ’» Learning C Code: A College Experience πŸ‘¨πŸΌβ€πŸ’»

πŸ“– Introduction

Today, my college class focused on the fundamentals of C programming. We dove into writing C code, with a specific emphasis on understanding and using format specifiers effectively.


🎯 Objectives

  • βœ… Learn the basics of writing C code
  • βœ… Understand the importance and usage of format specifiers

πŸ“Œ Topics Covered

  • πŸ”Ή Execution Of A Program
  • πŸ”Ή Prototype of printf
  • πŸ”Ή Printing Different Data Types
  • πŸ”Ή Precision Control
  • πŸ”Ή Length Control

πŸ“ Basics of Writing C Code

  • 🏁 Introduction to C programming language
  • βš™οΈ Setting up the C environment
  • πŸ“œ Writing and executing a simple C program
  • πŸ— Understanding the structure of a C program

πŸ”’ Format Specifiers

Format specifiers are used in C programming to control the input and output format. They are essential for formatting data in printf and scanf functions. Today, we covered the following format specifiers:

Format Specifier Description
%d Integer (int)
%f Floating-point number
%c Character
%s String
%x Hexadecimal representation
%o Octal representation
%lf Double
%% Percent symbol (%)
%u Unsigned decimal integer (unsigned int)

πŸ’» Example Code

Here’s an example of how to use format specifiers in a C program:

#include <stdio.h>

int main()
{
    char c = 'a';
    int x = -1;
    float f = 7.9;
    double d = 777.898989;
    printf("Formatted output: %c %d %u %o %x %f %lf\n", c, x, x, x, x, f, d);
    return 0;
}

πŸš€ This guide enhances the learning experience for C programming with structured insights and examples!

About

C CODE'S THAT I DID IN MY COLLEGEE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published