Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
30 views7 pages

BCA C Programs 01 To 20 Full

The document contains a collection of 20 C programming practical exercises for BCA Sem 1, each with its corresponding code. The programs cover basic concepts such as printing text, displaying personal details, and creating various patterns using stars. Additionally, the exercises include variable declarations and printing values for both integer and float types.

Uploaded by

sahilkhunti048
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

BCA C Programs 01 To 20 Full

The document contains a collection of 20 C programming practical exercises for BCA Sem 1, each with its corresponding code. The programs cover basic concepts such as printing text, displaying personal details, and creating various patterns using stars. Additionally, the exercises include variable declarations and printing values for both integer and float types.

Uploaded by

sahilkhunti048
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

BCA Sem 1 - C Programming Practical

Programs 01 to 20 with Code

Program 1: Hello World (001Hello.c)


#include <stdio.h>

int main() {
printf("Hello World\n");
return 0;
}

Program 2: Name & Surname in Different Lines (002Name.c)


#include <stdio.h>

int main() {
printf("Krunal\n");
printf("Madlani\n");
return 0;
}

Program 3: Personal Details (003Details.c)


#include <stdio.h>

int main() {
printf("Name: Krunal Madlani\n");
printf("College Name: Shri V. J. Modha College\n");
printf("Course Name: BCA\n");
printf("City: Porbandar\n");
printf("Pincode: 360575\n");
return 0;
}

Program 4: 12th Result Details (004Result.c)


#include <stdio.h>

int main() {
printf("Name : Krunal Madlani\n");
printf("HSC Result\n");
printf("English : 67\n");
printf("Gujarati : 66\n");
printf("Economics : 65\n");
printf("Org. of Comm. : 79\n");
printf("Statistics : 80\n");
printf("Elements of Acct : 85\n");
printf("Secretarial Practice : 83\n");
printf("Total : 525\n");
printf("Percentage : 75\n");
printf("Grade : B1\n");
return 0;
}

Program 5: Print Number 1 Pattern (005One.c)


#include <stdio.h>

int main() {
printf(" *\n");
printf(" *****\n");
printf(" *\n");
printf(" *\n");
printf(" *\n");
printf(" *\n");
printf(" *\n");
printf(" *********\n");
return 0;
}

Program 6: Print Number 2 Pattern (006Two.c)


#include <stdio.h>

int main() {
printf(" ***** \n");
printf(" * * \n");
printf(" * \n");
printf(" ** \n");
printf(" ** \n");
printf(" ** \n");
printf("*********\n");
return 0;
}

Program 7: Print Number 3 Pattern (007Three.c)


#include <stdio.h>

int main() {
printf(" ***** \n");
printf(" * \n");
printf(" * \n");
printf(" **** \n");
printf(" * \n");
printf(" * \n");
printf(" ***** \n");
return 0;
}

Program 8: INDIA IS GREAT Banner (008Pattern.c)


#include <stdio.h>

int main() {
printf("*******************************\n");
printf("* I N D I A I S G R E A T *\n");
printf("*******************************\n");
return 0;
}

Program 9: Star Triangle Pattern (009Pattern.c)


#include <stdio.h>

int main() {
printf("*\n");
printf("* *\n");
printf("* * *\n");
printf("* * * *\n");
printf("* * * * *\n");
return 0;
}

Program 10: Hollow Rectangle Star Pattern (010Pattern.c)


#include <stdio.h>

int main() {
printf("* * * * * *\n");
for (int i = 0; i < 3; i++) {
printf("*");
for (int j = 0; j < 15; j++) {
printf(" ");
}
printf("*\n");
}
printf("* * * * * *\n");
return 0;
}

Program 11: Double Block Star Pattern (011Pattern.c)


#include <stdio.h>

int main() {
printf(" ********** **********\n");
printf(" ********** **********\n");
printf(" ********** **********\n");
return 0;
}

Program 12: Pyramid Star Pattern (012Pattern.c)


#include <stdio.h>

int main() {
printf(" *\n");
printf(" * * *\n");
printf(" * * * * *\n");
printf(" * * * * * * *\n");
printf(" * * * * * * * * *\n");
printf("* * * * * * * * * * *\n");
return 0;
}

Program 13: One Integer Variable (013OneInt.c)


#include <stdio.h>

int main() {
int A = 20;
printf("Value of A is: %d\n", A);
return 0;
}

Program 14: Two Integer Variables (014TwoInt.c)


#include <stdio.h>

int main() {
int A = 20, B = 30;
printf("Value of A is: %d\n", A);
printf("Value of B is: %d\n", B);
return 0;
}

Program 15: Three Integer Variables (015ThreeInt.c)


#include <stdio.h>

int main() {
int A = 20, B = 30, C = 40;
printf("Value of A is: %d\n", A);
printf("Value of B is: %d\n", B);
printf("Value of C is: %d\n", C);
return 0;
}

Program 16: Five Integer Variables (016FiveInt.c)


#include <stdio.h>

int main() {
int A = 20, B = 30, C = 40, D = 50, E = 60;
printf("Value of A is: %d\n", A);
printf("Value of B is: %d\n", B);
printf("Value of C is: %d\n", C);
printf("Value of D is: %d\n", D);
printf("Value of E is: %d\n", E);
return 0;
}

Program 17: One Float Variable (017OneInt.c)


#include <stdio.h>

int main() {
float A = 50.25;
printf("Value of A is: %.2f\n", A);
return 0;
}

Program 18: Two Float Variables (018TwoInt.c)


#include <stdio.h>

int main() {
float A = 50.25, B = 73.35;
printf("Value of A is: %.2f\n", A);
printf("Value of B is: %.2f\n", B);
return 0;
}

Program 19: Three Float Variables (019ThreeInt.c)


#include <stdio.h>

int main() {
float A = 50.25, B = 73.35, C = 65.76;
printf("Value of A is: %.2f\n", A);
printf("Value of B is: %.2f\n", B);
printf("Value of C is: %.2f\n", C);
return 0;
}

Program 20: Five Float Variables (020FiveInt.c)


#include <stdio.h>

int main() {
float A = 50.25, B = 73.35, C = 65.76, D = 78.59, E = 34.75;
printf("Value of A is: %.2f\n", A);
printf("Value of B is: %.2f\n", B);
printf("Value of C is: %.2f\n", C);
printf("Value of D is: %.2f\n", D);
printf("Value of E is: %.2f\n", E);
return 0;
}
jay shree ram

sahil Rajshakha

You might also like