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 SpecifierDescription
%dInteger (int)
%fFloating-point number
%cCharacter
%sString
%xHexadecimal representation
%oOctal representation
%lfDouble
%%Percent symbol (%)
%uUnsigned decimal integer (unsigned int)

💻 Example Code

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

#include<stdio.h>intmain(){charc='a'; intx=-1; floatf=7.9; doubled=777.898989; printf("Formatted output: %c %d %u %o %x %f %lf\n", c, x, x, x, x, f, d); return0}

🚀 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