====== Computer Programming I ======
This is an introductory course to computer programming for engineers. Knowledge of C programming is commonly accepted as of primary importance for an engineer. This knowledge can easily be translated to any other programming language.
[[eec120_lab|Practical Exercise]]
===== Course Syllabus =====
{{page>archive:eec120plan&noheader}}
====== Introduction to C Programming ======
===== Variable and Operators =====
#include
int main(void)
{
printf("Size of unsigned int: %d\n",sizeof(unsigned int));
printf("Size of unsigned long long: %d\n",sizeof(unsigned long long));
printf("Size of unsigned long: %d\n",sizeof(unsigned long));
printf("Size of unsigned short: %d\n",sizeof(unsigned short));
printf("Size of unsigned char: %d\n",sizeof(unsigned char));
return 0;
}
#include
int main(void)
{
printf("Size of int: %d\n",sizeof(int));
printf("Size of float: %d\n",sizeof(float));
printf("Size of double: %d\n",sizeof(double));
printf("Size of long double: %d\n",sizeof(long double));
printf("Size of char: %d\n",sizeof(char));
return 0;
}