Programming_in_Linux-v0.1
Programming_in_Linux-v0.1
AY 2023-24
GITAM UNIVERSITY v0.1, 05th Feb 2024
Rajesh Sola
www.gitamedu.com
Outline
wsl --update
wsl --install -d Ubuntu
wsl --status
wsl -l –v
wsl
#include<sdio,h>
#ifndef __FUN_H
test.c fun.h
#define __FUN_H
int sum(int,int);
int square(int);
int sum(int,int);
int square(int);
int main()
{
#endif
int a,b,c,d;
a=10;
b=20;
c=sum(a,b); #include<sdio,h>
d=squre(a); test.c
printf(“c=%d,d=%d\n”,c,d); #include "fun.h"
return 0;
} int main()
{
int a,b,c,d;
a=10;
b=20;
c=sum(a,b);
d=squre(a);
printf(“c=%d,d=%d\n”,c,d);
return 0;
}
Makefiles
make clean
make
make run Modify one of the file (test.c or sum.c or sqr.c or fun.h) and re-run
make, observe which commands are repeated and which are not
Code Visualization
Naming Conventions
• Camel Case
• Snake Case
• Pascal Case
• or any other convention followed by project team
Meaningful Names
Unused Variables
#include<stdio.h>