Skip to content

Commit 87fc598

Browse files
author
OpenGenus
committed
Initial codebase v1
1 parent 5196cdf commit 87fc598

File tree

152 files changed

+982238
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+982238
-0
lines changed

Week 1/Day 1/basic-structure.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
int main() {
3+
printf("First program");
4+
return 0;
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
int main() {
3+
printf("\\n");
4+
return 0;
5+
}

Week 1/Day 2/basic-structure.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
int main() {
3+
printf("First program");
4+
return 0;
5+
}

Week 1/Day 2/basic-version2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
int main() {
3+
printf("First program");
4+
printf("Second Line");
5+
return 0;
6+
}

Week 1/Day 2/basic-version3.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
int main() {
3+
printf("First program\n");
4+
printf("Second Line");
5+
return 0;
6+
}

Week 1/Day 2/horizontal-tab.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <stdio.h>
2+
int main()
3+
{
4+
printf("opengenus123456\tr\n");
5+
printf("opengenus1234567\tr");
6+
return 0;
7+
}

Week 1/Day 2/pattern-version1.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <stdio.h>
2+
int main()
3+
{
4+
printf("abz\n");
5+
printf(" pqr\n");
6+
printf(" mno\n");
7+
printf(" qrs\n");
8+
printf("tvz");
9+
return 0;
10+
}

Week 1/Day 2/pattern-version2.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <stdio.h>
2+
int main()
3+
{
4+
printf("abz\v");
5+
printf("pqr\v");
6+
printf("mno\b\b\b\b\b\b");
7+
printf("\vqrs\n");
8+
printf("tvz");
9+
return 0;
10+
}

Week 1/Day 3/automatic-variable.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
fun();
5+
fun();
6+
fun();
7+
return 0;
8+
}
9+
void fun()
10+
{
11+
auto int a=5; //auto int or simply int
12+
a=a+1;
13+
printf("a=%d\n",a);
14+
}

Week 1/Day 3/external-variable.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include"external-variable.h" //file containing external variable is included here
2+
#include<stdio.h>
3+
extern int a;
4+
int main()
5+
{
6+
printf("value of external interger is:%d",a);
7+
return 0;
8+
}

0 commit comments

Comments
 (0)