C Programming COP 3223 lecture 1. Raja Iqbal. About Myself. Graduate Student at the School of EECS Areas of Interest are Image Compression, Signal Processing, Hardware and ASIC Design and FPGA Architectures Work Experience Graduate Research Assistant, School of EECS
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
On completion of this syllabus you should be able to
There are millions of books on C Programming. I will name few that I like.
The following will be the output of the Hello World program
Variable names are example of identifiers.They have the following rules:
Are they the same?
_Value_Are the following variable names valid?
long int or long
Floating point types
long doubleBasic types
long num_records = 0;
double length = 3.7, width = 2.7;
What is 5 divided by 2?
printf("There are %d people here.\n", num_people);
%d for integer
%e for float in scientific notation
%f for float in decimals
%g chooses %e or %f format for you
%c for ASCII character
%le for a double in scientific notation
%.2f for float to 2 places of decimals
\% or %% for literal % sign
\" for literal "
\n for new line
\t for tab
\\ for literal backslash
scanf("%d %f", &my_int, & my_float);
x + 2;
y = x + 2;
a = 5 + b = c * 2;
1. Include stdio.h and declare main
2. Declare space for variables
3. Input the value in centigrade
4. Do the calculation
5 Output the answer.
void main (void)
float cent, fahr;
printf("Enter temperature in Centigrade\n");
fahr = cent * 9/5 + 32;
printf("In Fahrenheit this is %.2f degrees\n",fahr);
instead write a+= b;
instead write a++ or ++a
Order in which arithmetic operations are evaluated
unsigned int population;
x = (int) y;
Note that this truncates and does not round