J

@jayanth_balamurugan_R

factorial

C
2 years ago
#include<stdio.h> int factorial(int n) { if (n == 0) return 1; else return(n*factorial(n-1)); } int main () {

program to store information of 10 students using structures

C
2 years ago
#include<stdio.h> struct students{ char name[50]; int rollno; char native[50]; char class[50]; }; int main(){ struct students s[10];

evaluation-4 factorial

C
2 years ago
#include<stdio.h> long factorial(int n) { if (n == 0) return 1; else return(n*factorial(n-1)); } int main () {

factorial

C
2 years ago
#include<stdio.h> int factorial(int n) { if (n == 0) return 1; else return(n*factorial(n-1)); } int main () {

s

C
2 years ago
#include <stdio.h> #include <string.h> struct person{ int age; char name[90]; }; int main() { struct person s1; printf("enter the name of the person: "); scanf("%s",&s1.name);

structure 2 persons

C
2 years ago
#include <stdio.h> #include <string.h> struct details { char name[90]; int rollno; int semesterno; char school[90]; char university[90]; char place [90]; };

structures

C
2 years ago
#include <stdio.h> struct mystructure{ int mynum; char myletter; char mystring[90]; }; int main() { struct mystructure s1={18 , 'B' , "jivin adithya" };

structure string

C
2 years ago
#include <stdio.h> #include <string.h> struct mystructure{ int mynum; char myletter; char mystring[90]; }; int main() { struct mystructure s1;

structure

C
2 years ago
#include <stdio.h> struct mystructure { int mynum; char myletter; }; int main() { struct mystructure s1; s1.mynum=13; s1.myletter='B';

function return upper and lowercase

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("enter a character: "); scanf("%c",&ch); printf("\nupper case: %c and lower case: %c",toupper(ch),tolower(ch)); return 0; }

c program to check the character is uppercase or lowercase

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("enter the character: "); scanf("%c",&ch); if (isupper(ch)){ printf("\nthe alphabet is in uppercase"); }

check whether the character is number

C
2 years ago
#include<stdio.h> #include<ctype.h> int main(){ char ch; printf("enter the character: "); scanf("%c",&ch); if(isdigit(ch)){ printf("\nthe character is a number"); }

check whether the character is alphabet

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("enter a character to check whether it is alphabet or not: "); scanf("%c",&ch); if(isalpha(ch)){ printf("\nthe character is an alphabet"); }

checks whether the character is alphanumeric or not

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("enter the character: "); scanf("%c",&ch); if (isalnum(ch)){ printf("\nthe entered character is alphanumeric"); }

Write a program in C to show the basic declaration of a pointer.

C
2 years ago
#include <stdio.h> int main(void) { int m = 10, n, o; int *z = &m; printf("\n\n z stores the address of m = %p\n", z); printf("\n *z stores the value of m = %i\n", *z); printf("\n &m is the address of m = %p\n", &m);

Write a program in C to print the first 50 natural numbers using recursion.

C
2 years ago
#include<stdio.h> int numPrint(int); int main() { int n = 1; printf(" The natural numbers are :"); numPrint(n); return 0; } int numPrint(int n)

factorial using function iteration

C
2 years ago
#include <stdio.h> int fact(int n){ int res=1; while (n!=0){ res=res*n; n--; } return res; }

when odd (add 1), when even (subtract 1)

C
2 years ago
#include <stdio.h> int odd(); int even(); int n=1; int odd(){ if(n<=10){ printf("\t%d",n+1); n++;

factorial using recursion

C
2 years ago
#include <stdio.h> int fact(int n) { if (n == 1){ return 1; } else{ return n *fact(n-1); }

.

C
2 years ago
#include <stdio.h> int main() { int a[3][3],b[3][3],c[3][3]; int i=0,j=0; for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf("%d",&a[i][j]); } }