SSSITSOURCE
SSSITSOURCE
  • 6
  • 157 035
Online c compiler use New line
Online c compiler use New line
this video is use for demo purpose
use for online compiler
use online compiler on c programming
use online compiler on c++ programming
use online compiler on java programming
use online compiler on python language
it is sample of program use for students teaching
Online C Programming Compiler | Use Online Compiler In Mobile
channel links:-
th-cam.com/channels/tZ2i7H_2HFzfhRZiDD7Sfw.html
Sample Of C Programming|Hello World C Programme|
hello world
hello world programm
c programming
programming
hello world program in c
c programming for beginners
sample of c programm
SSS IT SOURCE
#SampleOfCProgramming
#HelloWorldCProgramme
#helloworld
#helloworldprogramm
#cprogramming
#programming
#helloworldprograminc
#cprogrammingforbeginners
#sampleofcprogramm
#OnlineCProgrammingCompiler | #UseOnlineCompilerInMobile
#Sssitsource
#viral
มุมมอง: 52

วีดีโอ

ความคิดเห็น

  • @HarshitaPatel-b8h
    @HarshitaPatel-b8h 24 วันที่ผ่านมา

    agar laptop me iski screen bdi ho jaye to kya kre

  • @maheshKshirsagar-w8g
    @maheshKshirsagar-w8g 2 หลายเดือนก่อน

    Title : 1. To find Z and inverse Z transform and pole zero plot of Z-transfer function. 2. To solve the difference equation and find the system response using Z transform. Program: 1] x=input("Enter the Seq:") l=length(x); y=0; z=sym('z'); for i=0: l-1 y=y+x(i+1)*z^-i; end disp('Z Transform:') disp(y) Output: Enter the Seq: [1,1,1,1] x = 1 1 1 1 Z Transform: 1/z + 1/z^2 + 1/z^3 + 1 2] syms n x=n+1; disp('Input Eq:') disp(x); y=ztrans(x); disp('Z Transform:') disp(y) ans1=iztrans(y); disp('Inverse Z Transform:') disp(ans1)

  • @maheshKshirsagar-w8g
    @maheshKshirsagar-w8g 2 หลายเดือนก่อน

    Title : 1. To study the circular convolution for calculation of linear convolution and aliasing effect. Take two sequences of length 4. 2. Write a program to find 4 point circular convolution and compare the result with 8 point circular convolution to study aliasing in time domain. Program: clc; x=[1,2,3,4]; h=[1,2,2,1]; l1=length(x); l2=length(h); N=max(l1,l2); y=cconv(x,h,N); disp(y) x=[x,zeros(1:N-l1)]; h=[h,zeros(1:N-l2)]; y=zeros(1,N); for m=0:N-1 for n=0:N-1 z=mod(m-n,N); y(m+1)=y(m+1)+x(n+1)*h(z+1); end end disp(y); k=0:N-1; subplot(3,1,1) stem(k,x) title('x(n)'); xlabel('n') ylabel('x(n)'); subplot(3,1,2) stem(k,h) title('h(n)'); xlabel('n') ylabel('h(n)'); subplot(3,1,3) stem(k,y) title('y(n)'); xlabel('n') ylabel('y(n)'); sgtitle('Circular Convolution')

  • @maheshKshirsagar-w8g
    @maheshKshirsagar-w8g 2 หลายเดือนก่อน

    Circular Convolution Properties: Program: x=[1,2,3,4,0,0]; h=[-3,2,1,0,0,0]; Nx=length(x); Nh=length(h); N=max(Nx,Nh); direct=cconv(x,h,Nh); disp("Circular Convolution"); disp(direct); x=[x,zeros(1,N-Nx)]; h=[h,zeros(1,N-Nh)]; X=fft(x); Y=fft(h); Z=X.*Y; z=ifft(Z); disp("Using std function") disp(z); Output: Circular Convolution -3.0000 -4.0000 -4.0000 -4.0000 11.0000 4.0000 Using std function -3.0000 -4.0000 -4.0000 -4.0000 11.0000 4.0000

  • @ManojKumar-c6i1e
    @ManojKumar-c6i1e 2 หลายเดือนก่อน

    👍👍

  • @Nuc-ny4bz
    @Nuc-ny4bz 5 หลายเดือนก่อน

    How to enter input?

  • @Gurtej_1828
    @Gurtej_1828 7 หลายเดือนก่อน

    C program to implement Bubble Sort: #include <stdio.h> // Function to perform Bubble Sort void bubbleSort(int arr[], int n) { int i, j; for (i = 0; i < n - 1; i++) { for (j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { // Swap arr[j] and arr[j+1] int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } } // Function to print the array void printArray(int arr[], int n) { for (int i = 0; i < n; i++) { printf("%d ", arr[i]); } printf(" "); } int main() { int arr[] = {64, 25, 12, 22, 11}; int n = sizeof(arr) / sizeof(arr[0]); printf("Original array: "); printArray(arr, n); // Perform Bubble Sort bubbleSort(arr, n); printf("Sorted array: "); printArray(arr, n); return 0; } In this program: - The `bubbleSort` function implements the Bubble Sort algorithm. It iterates through the array and swaps adjacent elements if they are in the wrong order. - The `printArray` function is used to print the elements of the array. - In the `main` function, we initialize an array with some elements, print the original array, perform Bubble Sort, and then print the sorted array. You can run this program to see Bubble Sort in action, sorting the given array in ascending order.

  • @Dimple_Handiaya
    @Dimple_Handiaya 7 หลายเดือนก่อน

    #include <stdio.h> // Define the structure code struct code { int i; char c; struct code *ptr; }; // Don't forget the semicolon at the end of the structure definition int main() { struct code var1; struct code var2; var1.i = 65; var1.c = 'A'; var1.ptr = NULL; var2.i = 66; var2.c = 'B'; var2.ptr = NULL; var1.ptr = &var2; // Print the values of var1 printf("var1.i: %d, var1.c: %c ", var1.i, var1.c); // Print the values of var1's pointer member printf("var1.ptr->i: %d, var1.ptr->c: %c ", var1.ptr->i, var1.ptr->c); return 0; }

  • @Dimple_Handiaya
    @Dimple_Handiaya 7 หลายเดือนก่อน

    #include <stdio.h> // Define the structure for an employee struct employee { int emp_no; char emp_name[50]; char department_name[50]; float salary; }; // Function to display the details of an employee void displayEmployee(struct employee emp) { printf("Employee Number: %d ", emp.emp_no); printf("Employee Name: %s ", emp.emp_name); printf("Department Name: %s ", emp.department_name); printf("Salary: %.2f ", emp.salary); printf(" "); } int main() { // Array to store 20 employees struct employee employees[20]; // Input details for each employee for (int i = 0; i < 20; i++) { printf("Enter details for employee %d: ", i + 1); printf("Employee Number: "); scanf("%d", &employees[i].emp_no); printf("Employee Name: "); scanf("%s", employees[i].emp_name); printf("Department Name: "); scanf("%s", employees[i].department_name); printf("Salary: "); scanf("%f", &employees[i].salary); } // Display details of all employees printf(" Employee Details: "); for (int i = 0; i < 20; i++) { printf("Details for employee %d: ", i + 1); displayEmployee(employees[i]); } return 0; }

  • @Dimple_Handiaya
    @Dimple_Handiaya 7 หลายเดือนก่อน

    *Programme:* #include <stdio.h> int main() { int num = 10; // Declare and initialize an integer variable int *ptr; // Declare a pointer to an integer ptr = &num; // Assign the address of num to ptr // Print the value of num using the pointer printf("Value of num: %d ", *ptr); // Change the value of num using the pointer *ptr = 20; // Print the updated value of num printf("Updated value of num: %d ", num); return 0; } *In this program:* - We declare an integer variable `num` and initialize it to 10. - We declare a pointer `ptr` to an integer. - We assign the address of `num` to the pointer `ptr` using the address-of operator `&`. - We print the value of `num` using the pointer `ptr` by dereferencing it with the dereference operator `*`. - We change the value of `num` indirectly through the pointer `ptr`. - Finally, we print the updated value of `num`. *This program demonstrates the basic concept of pointers: storing memory addresses and accessing the data stored at those addresses indirectly.*

  • @Dimple_Handiaya
    @Dimple_Handiaya 7 หลายเดือนก่อน

    #include <stdio.h> // Define the structure for an employee struct employee { int emp_no; char emp_name[50]; char department_name[50]; float salary; }; // Function to display the details of an employee void displayEmployee(struct employee emp) { printf("Employee Number: %d ", emp.emp_no); printf("Employee Name: %s ", emp.emp_name); printf("Department Name: %s ", emp.department_name); printf("Salary: %.2f ", emp.salary); printf(" "); } int main() { // Array to store 20 employees struct employee employees[20]; // Input details for each employee for (int i = 0; i < 20; i++) { printf("Enter details for employee %d: ", i + 1); printf("Employee Number: "); scanf("%d", &employees[i].emp_no); printf("Employee Name: "); scanf("%s", employees[i].emp_name); printf("Department Name: "); scanf("%s", employees[i].department_name); printf("Salary: "); scanf("%f", &employees[i].salary); } // Display details of all employees printf(" Employee Details: "); for (int i = 0; i < 20; i++) { printf("Details for employee %d: ", i + 1); displayEmployee(employees[i]); } return 0; }

  • @SyedaJaveriya-n1p
    @SyedaJaveriya-n1p 9 หลายเดือนก่อน

    Thanks

  • @Seven-oe2om
    @Seven-oe2om 10 หลายเดือนก่อน

    bro thank u so much

  • @RCHPETLOVER
    @RCHPETLOVER 10 หลายเดือนก่อน

    👍🏻

  • @Yashwant_Chavan
    @Yashwant_Chavan 11 หลายเดือนก่อน

    //Queue using LL- #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> typedef struct node{ int data; struct node *next; }NODE; NODE *front=NULL; NODE *rear=NULL; void insertq(int); void delq(); int main(){ int choice, x; do { printf("1.insert\t2delete"); printf(" Enter choice"); scanf("%d",&choice); switch(choice) { case 1:printf("Enter data="); scanf("%d",&x); insertq(x); break; case 2:delq(); break; } } while(choice!=3); getch(); } void insertq(int x) { NODE *ptr; ptr=(NODE*)malloc(sizeof(NODE)); if(ptr==NULL) printf("INSUFFICIENT STORAGE"); else { ptr->data=x; ptr->next=NULL; if(rear==NULL) front=rear=ptr; else { rear->next=ptr; rear=ptr; } } } void delq() { int x; NODE *temp; temp=front; if(temp==NULL) printf("queue is empty"); else{ x=temp->data; front=front->next; free(temp); printf("%d",x); } } //Output- 1.insert 2delete Enter choice1 Enter data=100 1.insert 2delete Enter choice1 Enter data=200 1.insert 2delete Enter choice1 Enter data=300 1.insert 2delete Enter choice2 1001.insert 2delete Enter choice2 2001.insert 2delete Enter choice2 3001.insert 2delete Enter choice.

  • @Yashwant_Chavan
    @Yashwant_Chavan 11 หลายเดือนก่อน

    //Read and write file- #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { FILE *fp; char fName[20]; printf(" Enter file name to create: "); scanf("%s", fName); fp = fopen(fName, "w"); if (fp == NULL) { printf("File could not be created!"); exit(EXIT_FAILURE); } printf("File created successfully. "); putc('A', fp); putc('B', fp); putc('C', fp); if (fclose(fp) != 0) { perror("Error closing file"); exit(EXIT_FAILURE); } printf("Data written successfully. "); fp = fopen(fName, "r"); if (fp == NULL) { printf("Can't open file for reading!"); exit(EXIT_FAILURE); } printf("Contents of the file are: "); printf("%c", getc(fp)); printf("%c", getc(fp)); printf("%c", getc(fp)); if (fclose(fp) != 0) { perror("Error closing file"); exit(EXIT_FAILURE); } return 0; } //output:- Enter file name to create: yash File created successfully. Data written successfully. Contents of the file are: ABC [Process completed - press Enter]

  • @Yashwant_Chavan
    @Yashwant_Chavan 11 หลายเดือนก่อน

    // PostFix program.- #include<stdio.h> #include<ctype.h> int stack[20]; int top = -1; void push(int x) { stack[++top] = x; } int pop() { return stack[top--]; } int main() { char exp[20]; char *e; int n1,n2,n3,num; printf("Enter the expression :: "); scanf("%s",exp); e = exp; while(*e != '\0') { if(isdigit(*e)) { num = *e - 48; push(num); } else { n1 = pop(); n2 = pop(); switch(*e) { case '+': { n3 = n1 + n2; break; } case '-': { n3 = n2 - n1; break; } case '*': { n3 = n1 * n2; break; } case '/': { n3 = n2 / n1; break; } } push(n3); } e++; } printf(" The result of expression %s = %d ",exp,pop()); return 0; } Output:- Enter the expression :: 576*+ The result of expression 576*+ = 47

  • @Yashwant_Chavan
    @Yashwant_Chavan 11 หลายเดือนก่อน

    Polynomial addition - #include<stdio.h> #include<conio.h> #define MAX 10 typedef struct poly { int coeff; int power; } POLY; int main() { int m, n, i, j, k; POLY pa[MAX], pb[MAX], pc[MAX]; printf("Enter number of terms of first polynomial="); scanf("%d", &m); printf("Coefficient and Power of first polynomial="); for (i = 0; i < m; i++) scanf("%d%d", &pa[i].coeff, &pa[i].power); printf("First polynomial="); for (i = 0; i < m - 1; i++) { printf("%dx^%d+", pa[i].coeff, pa[i].power); } if (pa[i].power == 0) printf("%d", pa[i].coeff); else printf("%dx^%d", pa[i].coeff, pa[i].power); printf(" Enter number of terms of second polynomial="); scanf("%d", &n); printf("Coefficient and Power of second polynomial="); for (i = 0; i < n; i++) scanf("%d%d", &pb[i].coeff, &pb[i].power); printf("Second polynomial="); for (i = 0; i < n - 1; i++) { printf("%dx^%d+", pb[i].coeff, pb[i].power); } if (pb[i].power == 0) printf("%d", pb[i].coeff); else printf("%dx^%d", pb[i].coeff, pb[i].power); i = 0; j = 0; k = 0; while (i < m && j < n) { if (pa[i].power == pb[j].power) { pc[k].coeff = pa[i].coeff + pb[j].coeff; pc[k].power = pa[i].power; i++; j++; k++; } else { if (pa[i].power > pb[j].power) { pc[k] = pa[i]; i++; k++; } else { pc[k] = pb[j]; j++; k++; } } } while (i < m) { pc[k] = pa[i]; i++; k++; } while (j < n) { pc[k] = pb[j]; j++; k++; } printf(" Addition of two polynomials="); for (i = 0; i < k - 1; i++) { printf("%dx^%d+", pc[i].coeff, pc[i].power); } if (pc[i].power == 0) printf("%d", pc[i].coeff); else printf("%dx^%d", pc[i].coeff, pc[i].power); return 0; }

  • @Yashwant_Chavan
    @Yashwant_Chavan 11 หลายเดือนก่อน

    To find even and Odd Number : Program: #include <stdio.h> int main() { int num; printf("Enter an integer: "); scanf("%d", &num); if(num % 2 == 0) printf("%d is even.", num); else printf("%d is odd.", num); return 0; } Output: Enter an integer: 5 5 is odd. B] To Find Factorial of any No: Program: #include <stdio.h> int factorial(int n) { int res = 1, i; for (i = 2; i <= n; i++) res *= i; return res; } int main() { int num; printf("Enter the num:"); scanf("%d",&num); printf("Factorial of %d is %d",num, factorial(num)); return 0; } Output: Enter the num:6 Factorial of 6 is 720 C] To find Maximum no’s Between any 3 Number: Program: #include<stdio.h> int main(){ int a,b,c; printf("enter the value of b,c and A:"); scanf("%d,%d,%d",&a,&b,&c); if (b > a) { printf("Value of b is Maximum!!"); } if (c > a) { printf("Value of c is Maximum!!"); } return 0; } Output: Enter the value of b,c and a: 462 Value of c is Maximum!! D] To Swap Two Numbers: Program: #include <stdio.h> int main() { int x,y; printf("Enter Value of x "); scanf("%d",&x); printf(" Enter Value of y "); scanf("%d",&y); int temp = x; x = y; y = temp; printf(" After Swapping: x = %d, y = %d", x,y); return 0; } Output: Enter Value of x 16 Enter Value of y 90 After Swapping: x = 90, y = 16 E] Addition Of Two Numbers: Program: #include <stdio.h> int main() { int A,B,C; printf("Enter Value of A:"); scanf("%d",&A); printf(" Enter Value of B: "); scanf("%d",&B); C=A+B; printf("Sum of %d and %d is %d:",A,B,C); return 0; } Output: Enter Value of A:12 Enter Value of B: 13 Sum of 12 and 13 is 25: F] Find Table Of Number: Program: #include <stdio.h> int main() { int n,num,i; printf("Enter the value of n:"); scanf("%d",&n); for(i=1;i<11;i++) { num=n*i; printf("%d*%d=%d ",n,i,num); } return 0; } Output: Enter the value of n:5 5*1=5 5*2=10 5*3=15 5*4=20 5*5=25 5*6=30 5*7=35 5*8=40 5*9=45 5*10=50

  • @ufufuigrfufufu651
    @ufufuigrfufufu651 ปีที่แล้ว

    ALU Library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity ALU is port (a, b,s: in std_logic_vector(3 downto 0); cin: in std_logic; y: out std_logic_vector(3 downto 0)); end ALU; architecture BBBB of ALU is begin with s (3 downto 0) select y<=a+b+cin when “0000”, a-b when “0001”,

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    🎉🎉🎉/*Singly linked List*/ #include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct node { int data; struct node *next; }NODE; NODE* create(); void display(NODE*); NODE* insert(NODE*,int,int); NODE* del(NODE*,int); void search(NODE*,int); int main() { NODE *head=NULL; int choice,p,x; while(1) { printf(" 1.Create 2.Display 3.Insert 4.Delete 5.Search 6.Exit ENTER YOUR CHOICE:"); scanf("%d",&choice); switch(choice) { case 1: head=create(); break; case 2: display(head); break; case 3: printf(" Enter Data and Position:"); scanf("%d%d",&x,&p); head=insert(head,x,p); display(head); break; case 4: printf("Enter Node no. To be Deleted:"); scanf("%d",&p); head=del(head,p); display(head); break; case 5: printf("Enter No. To be Searched"); scanf("%d",&x); search(head,x); break; default:exit(0); } } return 0; } NODE* create() { NODE *head,*temp,*newnode; int i,n,x; head=NULL; printf(" Enter How Many No.s="); scanf("%d",&n); for(i=1;i<=n;i++) { printf(" Enter Data:"); scanf("%d",&x); newnode=(NODE*)malloc(sizeof(NODE)); newnode->data=x; newnode->next=NULL; if(head==NULL) { head=newnode; } else { temp->next=newnode; } temp=newnode; } return(head); } void display(NODE *temp) { while(temp!=NULL) { printf("%d->",temp->data); temp=temp->next; } printf("NULL"); } NODE* insert(NODE *head1,int x,int p) { NODE *newnode,*temp=head1; int i=1; while(i<p&&temp!=NULL) { temp=temp->next; i++; } if(temp!=NULL) { newnode=(NODE*)malloc(sizeof(NODE)); newnode->data=x; if(p==0) { newnode->next=head1; head1=newnode; } else { newnode->next=temp->next; temp->next=newnode; } } return(head1); } NODE* del(NODE *head1,int p) { NODE *temp,*prev; int i=1; temp=head1; while(i<p&&temp!=NULL) { prev=temp; temp=temp->next; i++; } if(temp!=NULL) { if(p==1) { head1=head1->next; free(temp); } else { prev->next=temp->next; free(temp); } } else { printf("INVALID POSITION"); } return(head1); } void search(NODE *head1,int x) { NODE *temp; int c=1; temp=head1; while(temp->data!=x&&temp!=NULL) { temp=temp->next; c++; } if(temp!=NULL) { printf("No. is Found at Location %d",c); } else { printf("No. is Not Found:"); } }

  • @Sagar_pokale
    @Sagar_pokale ปีที่แล้ว

    #include <stdio.h> #include <stdlib.h> #include<string.h> int str_length(char[]); void str_copy(char str2[],char str1[]); void str_rev(char str2[],char str1[]); int str_cmp(char str1[],char str2[]); int main() { char str1[10], str2[10],str3[10]; int len,choice,flag; printf("Enter Choice: 1.Length, 2.Copy, 3.Reverse, 4.Palindrome "); printf("Enter choice "); scanf("%d",&choice); switch(choice) { case 1: printf("Enter first string "); scanf("%s",str1); len=str_length(str1); printf("length of string is=%d",len); break; case 2: printf("Enter first string "); scanf("%s",str1); str_copy(str2,str1); printf("copied string is=%s",str2); break; case 3: printf("Enter first string "); scanf("%s",str1); str_rev(str2,str1); printf("reversed string is=%s",str2); break; case 4: printf("Enter first string "); scanf("%s",str1); str_copy(str2,str1); str_rev(str3,str1); if(str_cmp(str2,str3)==0) printf(" The string is palindrome"); else printf(" The string is not palindrome"); break; case 7: } return 0; } int str_length(char str1[]) { int i, count=0; for (i=0;str1[i]!='\0';i++); //count=count+1; return i; } void str_copy(char str2[],char str1[]) { int i,j=0; for(i=0;str1[i]!='\0';i++) { str2[j]=str1[i]; j=j+1; } str2[j]='\0'; } void str_rev(char str2[],char str1[]) { int i,j=0,n; n=str_length(str1); for(i=n-1;i>=0;i--) { str2[j]=str1[i]; j=j+1; } str2[j]='\0'; } int str_cmp(char str1[],char str2[]) { int i=0,j=0,flag=0; for(i=0;str1[i]!='\0';i++) { if (str1[i]==str2[j]) j=j+1; else { flag=1; break; } } if(flag==1) return 1; else return 0; }

  • @Sagar_pokale
    @Sagar_pokale ปีที่แล้ว

    #include <stdio.h> #include <stdlib.h> #include<string.h> int str_len_ptr(char*); void str_copy_ptr(char*,char*); void str_rev_ptr(char*,char*); int compare(char*, char*); int main() { char str1[10], str2[10], str3[10]; int len,choice,flag; printf("Enter Choice:1.Length, 2.Copy, 3.Reverse,4.Palindrome "); printf("Enter choice "); scanf("%d",&choice); switch(choice) { case 1: printf("Enter first string "); scanf("%s",str1); int len=str_len_ptr(str1); printf("length of string is=%d",len); break; case 2: printf("Enter first string "); scanf("%s",str1); str_copy_ptr(str2,str1); printf("copied string is=%s",str2); break; case 3: printf("Enter first string "); scanf("%s",str1); str_rev_ptr(str2,str1); printf("reversed string is=%s",str2); break; case 4: printf("Enter first string "); scanf("%s",str1); str_copy_ptr(str2,str1); str_rev_ptr(str3,str1); if(compare(str2,str3)==0) printf(" The string is not palindrome"); else printf(" The string is palindrome"); break; } return 0; } int str_len_ptr(char *ptr) { int count=0,i; for(i=0; *ptr!='\0';i++) { count++; ptr++; } return count; } void str_copy_ptr(char *op,char *ip) { int count=0,i; for(i=0; *ip!='\0';i++) { *op++=*ip++; } *op='\0'; } void str_rev_ptr(char *op,char *ip) { int i,j=0,n; n=str_len_ptr(ip); for(i=n-1;i>=0;i--) { //*(op+j)=*(ip+i); *op++=*(ip+i); j++; } *(op+j)='\0'; } int compare(char *ip, char *op) { int i; for (i = 0; *ip!='\0'; i++) { if (*ip++ != *op++) //if mismatch { return 0; } } return 1; }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤ #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX 100 typedef struct student { int rollno; char name[20]; int marks; float percent; } st; st e[MAX]; int n; void create(); void display(); void search(); int main() { int choice; while (1) { printf(" 1.Create 2.Display 3.Search 4.Exit"); printf(" Enter Your Choice:"); scanf("%d", &choice); switch (choice) { case 1: create(); break; case 2: display(); break; case 3: search(); break; case 4: exit(0); break; default: printf("Invalid choice. Please try again. "); } } return 0; } void create() { int i; printf("Enter The No. of New Records to Be Created:"); scanf("%d", &n); for (i = 0; i < n; i++) { printf("Enter rollno no., Name, marks, percentage:"); scanf("%d %s %d %f", &e[i].rollno, e[i].name, &e[i].marks, &e[i].percent); } } void display() { int i; printf("rollno\tNAME\tmarks\tpercentage "); for (i = 0; i < n; i++) { printf("%d\t%s\t%d\t%f ", e[i].rollno, e[i].name, e[i].marks, e[i].percent); } } void search() { int rollno, i, flag = 0; printf("Enter the rollno of student:"); scanf("%d", &rollno); for (i = 0; i < n; i++) { if (e[i].rollno == rollno) { printf(" Record is Found!!"); printf(" Details of student are as follows rollno\tNAME\tmarks\tpercentage "); printf("%d\t%s\t%d\t%f ", e[i].rollno, e[i].name, e[i].marks, e[i].percent); flag = 1; break; } } if (flag == 0) { printf(" RECORD NOT FOUND "); } }

  • @PRATIKNAGTILAK-p9n
    @PRATIKNAGTILAK-p9n ปีที่แล้ว

    Employee.... . . #include<string.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #define MAX 100 typedef struct employee { int id; char name[20]; int age; }emp; emp e[MAX]; int n; void create(); void display(); void modify(); void append(); void search(); void sort(); int main() { int choice; while(1) { printf(" 1.Create 2.Display 3.Modify 4.Append 5.Search 6.Sort 7.EXIT"); printf(" Enter Your Choice:"); scanf("%d",&choice); switch (choice) { case 1:create(); break; case 2:display(); break; case 3:modify(); break; case 4:append(); break; case 5:search(); break; case 6:sort(); break; default:exit(0); } } getch(); } void create() { int i; printf("Enter The No. of New Records to Be Created:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("Enter ID no.,Name,Age:"); scanf("%d%s%d",&e[i].id,e[i].name,&e[i].age); } } void display() { int i; printf("ID\tNAME\tAGE"); for(i=0;i<n;i++) { printf(" %d\t%s\t%d",e[i].id,e[i].name,e[i].age); } } void modify() { int rec,id_new,age_new; char name_new[20]; printf("Enter The Record No. To be Modified:"); scanf("%d",&rec); rec--; printf("Enter new Name:"); scanf("%s",name_new); printf("Enter new Age:"); scanf("%d",&age_new); printf("Enter new id:"); scanf("%d",&id_new); e[rec].id=id_new; e[rec].age=age_new; strcpy(e[rec].name,name_new); display(); } void append() { int rec,m,i; printf("Enter no. of Records To be Appended:"); scanf("%d",&rec); m=n+rec; for(i=n;i<m;i++) { printf("Enter ID NAME AGE of Employee:"); scanf("%d%s%d",&e[i].id,e[i].name,&e[i].age); } n=m; display(); } void search() { int id,i,flag=0; printf("Enter the ID of Employee:"); scanf("%d",&id); for(i=0;i<n;i++) { if(e[i].id==id) { printf(" Record is Found!!"); printf(" Details of Employee are as follows ID\tNAME\tAGE"); printf(" %d\t%s\t%d",e[i].id,e[i].name,e[i].age); flag=1; break; } } if(flag==0) { printf(" RECORD NOT FOUND"); } } void sort() { emp temp; int i,j; for(i=0;i<=n-2;i++) { for(j=i+1;j<=n-1;j++) { if(e[i].id>e[j].id) { temp=e[i]; e[i]=e[j]; e[j]=temp; } } } printf("SORTED LIST IS AS FOLLOWS "); display(); }

    • @Yashwant_Chavan
      @Yashwant_Chavan ปีที่แล้ว

      //MAX value ❤ #include<stdio.h> int main() { int a, b, c; printf("enter any three numbers:"); scanf("%d %d %d", &a, &b, &c); int max=a; if (b>max){ max = b; } if (c>max){ max = c; } printf("the maximum value is %d ",max); return 0; } //Factorial #include <stdio.h> int main() { int num, i; unsigned long long factorial = 1; // Prompt the user to enter a number printf("Enter a number: "); // Read the user's input into the 'num' variable scanf("%d", &num); // Calculate the factorial of the entered number for (i = 1; i <= num; i++) { factorial *= i; } // Display the result, which is the factorial of the entered number printf("Factorial of %d is %llu ", num, factorial); return 0; } //Table #include <stdio.h> int main() { int n, num, i; printf("enter the value of n:"); scanf("%d",&n); for(i=1;i<=10;i++) { num=n*i; printf("%d*%d=%d ",n, i, num); } } //Swipe two numbers #include <stdio.h> int main() { int x, y, temp; printf("enter values: "); scanf("%d %d", &x, &y); printf("values of before swiping x=%d y=%d",x,y); temp=x; x=y; y=temp; printf(" valus are after swiping x=%d y=%d",x,y); return 0; }

  • @ufufuigrfufufu651
    @ufufuigrfufufu651 ปีที่แล้ว

    XdEmployee . . . #include<string.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #define MAX 100 typedef struct employee { int id; char name[20]; int age; }emp; emp e[MAX]; int n; void create(); void display(); void modify(); void append(); void search(); void sort(); int main() { int choice; while(1) { printf(" 1.Create 2.Display 3.Modify 4.Append 5.Search 6.Sort 7.EXIT"); printf(" Enter Your Choice:"); scanf("%d",&choice); switch (choice) { case 1:create(); break; case 2:display(); break; case 3:modify(); break; case 4:append(); break; case 5:search(); break; case 6:sort(); break; default:exit(0); } } getch(); } void create() { int i; printf("Enter The No. of New Records to Be Created:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("Enter ID no.,Name,Age:"); scanf("%d%s%d",&e[i].id,e[i].name,&e[i].age); } } void display() { int i; printf("ID\tNAME\tAGE"); for(i=0;i<n;i++) { printf(" %d\t%s\t%d",e[i].id,e[i].name,e[i].age); } } void modify() { int rec,id_new,age_new; char name_new[20]; printf("Enter The Record No. To be Modified:"); scanf("%d",&rec); rec--; printf("Enter new Name:"); scanf("%s",name_new); printf("Enter new Age:"); scanf("%d",&age_new); printf("Enter new id:"); scanf("%d",&id_new); e[rec].id=id_new; e[rec].age=age_new; strcpy(e[rec].name,name_new); display(); } void append() { int rec,m,i; printf("Enter no. of Records To be Appended:"); scanf("%d",&rec); m=n+rec; for(i=n;i<m;i++) { printf("Enter ID NAME AGE of Employee:"); scanf("%d%s%d",&e[i].id,e[i].name,&e[i].age); } n=m; display(); } void search() { int id,i,flag=0; printf("Enter the ID of Employee:"); scanf("%d",&id); for(i=0;i<n;i++) { if(e[i].id==id) { printf(" Record is Found!!"); printf(" Details of Employee are as follows ID\tNAME\tAGE"); printf(" %d\t%s\t%d",e[i].id,e[i].name,e[i].age); flag=1; break; } } if(flag==0) { printf(" RECORD NOT FOUND"); } } void sort() { emp temp; int i,j; for(i=0;i<=n-2;i++) { for(j=i+1;j<=n-1;j++) { if(e[i].id>e[j].id) { temp=e[i]; e[i]=e[j]; e[j]=temp; } } } printf("SORTED LIST IS AS FOLLOWS "); display(); }

  • @CricYoti2.0
    @CricYoti2.0 ปีที่แล้ว

    youtube.com/@subhamvlogs3604?si=lp9517bWHA0xy0FT?sub_confirmation=1

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    😅😅😅😅😅😅😅😂❤❤❤❤❤❤❤😂😂😂🎉🎉🎉😢 //MAX value #include<stdio.h> int main() { int a, b, c; printf("enter any three numbers:"); scanf("%d %d %d", &a, &b, &c); int max=a; if (b>max){ max = b; } if (c>max){ max = c; } printf("the maximum value is %d ",max); return 0; } //Factorial #include <stdio.h> int main() { int num, i; unsigned long long factorial = 1; // Prompt the user to enter a number printf("Enter a number: "); // Read the user's input into the 'num' variable scanf("%d", &num); // Calculate the factorial of the entered number for (i = 1; i <= num; i++) { factorial *= i; } // Display the result, which is the factorial of the entered number printf("Factorial of %d is %llu ", num, factorial); return 0; } //Table #include <stdio.h> int main() { int n, num, i; printf("enter the value of n:"); scanf("%d",&n); for(i=1;i<=10;i++) { num=n*i; printf("%d*%d=%d ",n, i, num); } } //Swipe two numbers #include <stdio.h> int main() { int x, y, temp; printf("enter values: "); scanf("%d %d", &x, &y); printf("values of before swiping x=%d y=%d",x,y); temp=x; x=y; y=temp; printf(" valus are after swiping x=%d y=%d",x,y); return 0; }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    //string 😂😂😂with 😢😢😢😢😂ptr #include <stdio.h> #include <stdlib.h> #include<string.h> int str_len_ptr(char*); void str_copy_ptr(char*,char*); void str_rev_ptr(char*,char*); int compare(char*, char*); void str_substr(char*, char*); void str_cat_ptr(char*,char*); int main() { char str1[10], str2[10],str3[10]; int len,choice,flag; printf("Enter Choice 1-Length, 2-Copy, 3-Reverse,4-Compare,5- substring,6-Palindrome,7- Concatenation "); printf("Enter choice "); scanf("%d",&choice); switch(choice) { case 1: printf("Enter first string "); scanf("%s",str1); int len=str_len_ptr(&str1); printf("length of string is=%d",len); break; case 2: printf("Enter first string "); scanf("%s",str1); str_copy_ptr(&str2,&str1); printf("copied string is=%s",str2); break; case 3: printf("Enter first string "); scanf("%s",str1); str_rev_ptr(&str2,&str1); printf("reversed string is=%s",str2); break; case 4: printf("Enter first string "); scanf("%s",str1); printf("Enter second string "); scanf("%s",str2); //flag=str_cmp(str1,str2); flag=compare(&str1, &str2); if(flag==0) printf("Both strings are not equal"); else printf("Both strings are equal"); break; case 5: printf("Enter first string "); scanf("%s",str1); str_substr(&str1,&str2); break; case 6: printf("Enter first string "); scanf("%s",str1); str_copy_ptr(&str2,&str1); str_rev_ptr(&str3,&str1); if(compare(str2,str3)==0) printf(" The string is not palindrome"); else printf(" The string is palindrome"); break; case 7: printf("Enter first string "); scanf("%s",str1); printf("Enter second string "); scanf("%s",str2); str_cat_ptr(&str1,&str2); break; } return 0; } int str_len_ptr(char *ptr) { int count=0,i; for(i=0; *ptr!='\0';i++) { count++; ptr++; } return count; } void str_copy_ptr(char *op,char *ip) { int count=0,i; for(i=0; *ip!='\0';i++) { *op++=*ip++; } *op='\0'; } void str_rev_ptr(char *op,char *ip) { int i,j=0,n; n=str_len_ptr(ip); for(i=n-1;i>=0;i--) { //*(op+j)=*(ip+i); *op++=*(ip+i); j++; } *(op+j)='\0'; } int compare(char *ip, char *op) { int i; for (i = 0; *ip!='\0'; i++) { if (*ip++ != *op++) //if mismatch { return 0; } } return 1; } void str_substr(char *ip, char *op) { int len, position,i,j=0,k; len=str_len_ptr(ip); printf("Enter position="); scanf("%d",&position); for (i=0; i<len-position;i++) { k=position+i; *(op+j)=*(ip+k); j++; } op[j]='\0'; printf("Substring is %s", op); } void str_cat_ptr(char *ip,char *op) { int i,j; for(i=0;*(ip+i)!='\0';i++); for(j=0;*(op+j)!='\0';j++) { *(ip+i)=*(op+j); i++; } *(ip+i)='\0'; printf("After concatenation string is = %s", ip); }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    C😂alcul😂😂ator 😢😢😢😢 #include <stdio.h> int main() { float a, b, c; char opt; printf("Enter the value of a: "); scanf("%f", &a); printf("Enter the value of b: "); scanf("%f", &b); printf("Enter the operator (+, -, *): "); scanf(" %c", &opt); if (opt == '+') { c = a + b; printf("Sum of a and b is %f ", c); } else if (opt == '-') { c = a - b; printf("Subtraction of a and b is %f ", c); } else if (opt == '*') { c = a * b; printf("Multiplication of a and b is %f ", c); } else { printf("Invalid operator! Please enter +, -, or *. "); return 1; // Indicates error } return 0; }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    String without pt🥲🥲🥲🥲🥲 #include <stdio.h> #include <stdlib.h> #include <string.h> int str_length(char[]); void str_copy(char[], char[]); void str_rev(char[], char[]); int str_cmp(char[], char[]); void str_substr(char[], char[]); void str_cat(char[], char[]); int main() { char str1[50], str2[50], str3[50]; int len, choice, flag; printf("Enter Choice 1-Length, 2-Copy, 3-Reverse, 4-Compare, 5-Substring, 6-Palindrome, 7-Concatenation "); printf("Enter choice "); scanf("%d", &choice); switch (choice) { case 1: printf("Enter first string "); scanf("%s", str1); len = str_length(str1); printf("Length of string is = %d ", len); break; case 2: printf("Enter first string "); scanf("%s", str1); str_copy(str2, str1); printf("Copied string is = %s ", str2); break; case 3: printf("Enter first string "); scanf("%s", str1); str_rev(str2, str1); printf("Reversed string is = %s ", str2); break; case 4: printf("Enter first string "); scanf("%s", str1); printf("Enter second string "); scanf("%s", str2); flag = str_cmp(str1, str2); if (flag == 0) printf("Both strings are equal "); else printf("Both strings are not equal "); break; case 5: printf("Enter first string "); scanf("%s", str1); str_substr(str1, str2); break; case 6: printf("Enter first string "); scanf("%s", str1); str_copy(str2, str1); str_rev(str3, str1); if (strcmp(str2, str3) == 0) printf("The string is palindrome "); else printf("The string is not palindrome "); break; case 7: printf("Enter first string "); scanf("%s", str1); printf("Enter second string "); scanf("%s", str2); str_cat(str1, str2); printf("Concatenated string is = %s ", str1); break; } return 0; } int str_length(char str1[]) { return strlen(str1); } void str_copy(char str2[], char str1[]) { strcpy(str2, str1); } void str_rev(char str2[], char str1[]) { int len = strlen(str1); for (int i = 0; i < len; i++) { str2[i] = str1[len - i - 1]; } str2[len] = '\0'; } int str_cmp(char str1[], char str2[]) { return strcmp(str1, str2); } void str_substr(char str1[], char str2[]) { int position; printf("Enter position="); scanf("%d", &position); strncpy(str2, str1 + position, strlen(str1) - position); str2[strlen(str1) - position] = '\0'; printf("Substring is %s ", str2); } void str_cat(char str1[], char str2[]) { strcat(str1, str2); }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    Employeedata😂😂😂 #include <stdio.h> #include <string.h> #define MAX 100 typedef struct Employee { int id; char name[20]; int age; } Employee; Employee employees[MAX]; int numEmployees = 0; void create(); void display(); void modify(); void append(); void search(); void sort(); int main() { int choice; while (1) { printf(" 1. Create 2. Display 3. Modify 4. Append 5. Search 6. Sort 7. EXIT"); printf(" Enter Your Choice: "); scanf("%d", &choice); switch (choice) { case 1: create(); break; case 2: display(); break; case 3: modify(); break; case 4: append(); break; case 5: search(); break; case 6: sort(); break; case 7: return 0; default: printf("Invalid Choice! Please enter a valid option. "); } } } void create() { printf("Enter the Number of New Records to Be Created: "); scanf("%d", &numEmployees); for (int i = 0; i < numEmployees; i++) { printf("Enter ID, Name, Age: "); scanf("%d%s%d", &employees[i].id, employees[i].name, &employees[i].age); } } void display() { printf("ID\tNAME\tAGE "); for (int i = 0; i < numEmployees; i++) { printf("%d\t%s\t%d ", employees[i].id, employees[i].name, employees[i].age); } } void modify() { int rec, newId, newAge; char newName[20]; printf("Enter the Record No. to be Modified: "); scanf("%d", &rec); rec--; printf("Enter new Name: "); scanf("%s", newName); printf("Enter new Age: "); scanf("%d", &newAge); printf("Enter new ID: "); scanf("%d", &newId); employees[rec].id = newId; employees[rec].age = newAge; strcpy(employees[rec].name, newName); display(); } void append() { int numRecords, newNumEmployees; printf("Enter the number of Records to be Appended: "); scanf("%d", &numRecords); newNumEmployees = numEmployees + numRecords; for (int i = numEmployees; i < newNumEmployees; i++) { printf("Enter ID, Name, Age of Employee: "); scanf("%d%s%d", &employees[i].id, employees[i].name, &employees[i].age); } numEmployees = newNumEmployees; display(); } void search() { int id; printf("Enter the ID of Employee: "); scanf("%d", &id); for (int i = 0; i < numEmployees; i++) { if (employees[i].id == id) { printf(" Record Found! Details of Employee: ID\tNAME\tAGE "); printf("%d\t%s\t%d ", employees[i].id, employees[i].name, employees[i].age); return; } } printf("RECORD NOT FOUND "); } void sort() { Employee temp; for (int i = 0; i <= numEmployees - 2; i++) { for (int j = i + 1; j <= numEmployees - 1; j++) { if (employees[i].id > employees[j].id) { temp = employees[i]; employees[i] = employees[j]; employees[j] = temp; } } } printf("SORTED LIST IS AS FOLLOWS "); display(); }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    Studentdatabase😅 #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX 100 typedef struct student { int rollno; char name[20]; int marks; float percent; } st; st e[MAX]; int n; void create(); void display(); void search(); void sort(); int main() { int choice; while (1) { printf(" 1.Create 2.Display 3.Search 4.Sort 5.Exit"); printf(" Enter Your Choice:"); scanf("%d", &choice); switch (choice) { case 1: create(); break; case 2: display(); break; case 3: search(); break; case 4: sort(); break; case 5: exit(0); break; default: printf("Invalid choice. Please try again. "); } } return 0; } void create() { int i; printf("Enter The No. of New Records to Be Created:"); scanf("%d", &n); for (i = 0; i < n; i++) { printf("Enter rollno no.,Name,marks,percentage:"); scanf("%d %s %d %f", &e[i].rollno, e[i].name, &e[i].marks, &e[i].percent); } } void display() { int i; printf("rollno\tNAME\tmarks\tpercentage "); for (i = 0; i < n; i++) { printf("%d\t%s\t%d\t%f ", e[i].rollno, e[i].name, e[i].marks, e[i].percent); } } void search() { int rollno, i, flag = 0; printf("Enter the rollno of student:"); scanf("%d", &rollno); for (i = 0; i < n; i++) { if (e[i].rollno == rollno) { printf(" Record is Found!!"); printf(" Details of student are as follows rollno\tNAME\tmarks\tpercentage "); printf("%d\t%s\t%d\t%f ", e[i].rollno, e[i].name, e[i].marks, e[i].percent); flag = 1; break; } } if (flag == 0) { printf(" RECORD NOT FOUND "); } } void sort() { st temp; int i, j; for (i = 0; i < n - 1; i++) { for (j = i + 1; j < n; j++) { if (e[i].percent < e[j].percent) { temp = e[i]; e[i] = e[j]; e[j] = temp; } } } printf("SORTED LIST IS AS FOLLOWS "); display(); }

  • @bubailayek9218
    @bubailayek9218 ปีที่แล้ว

    Can I save my work I online compiler???

    • @Yashwant_Chavan
      @Yashwant_Chavan ปีที่แล้ว

      //MAX value ❤ #include<stdio.h> int main() { int a, b, c; printf("enter any three numbers:"); scanf("%d %d %d", &a, &b, &c); int max=a; if (b>max){ max = b; } if (c>max){ max = c; } printf("the maximum value is %d ",max); return 0; } //Factorial #include <stdio.h> int main() { int num, i; unsigned long long factorial = 1; // Prompt the user to enter a number printf("Enter a number: "); // Read the user's input into the 'num' variable scanf("%d", &num); // Calculate the factorial of the entered number for (i = 1; i <= num; i++) { factorial *= i; } // Display the result, which is the factorial of the entered number printf("Factorial of %d is %llu ", num, factorial); return 0; } //Table #include <stdio.h> int main() { int n, num, i; printf("enter the value of n:"); scanf("%d",&n); for(i=1;i<=10;i++) { num=n*i; printf("%d*%d=%d ",n, i, num); } } //Swipe two numbers #include <stdio.h> int main() { int x, y, temp; printf("enter values: "); scanf("%d %d", &x, &y); printf("values of before swiping x=%d y=%d",x,y); temp=x; x=y; y=temp; printf(" valus are after swiping x=%d y=%d",x,y); return 0; }

    • @Yashwant_Chavan
      @Yashwant_Chavan ปีที่แล้ว

      Employee Database🎉 #include<string.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #define MAX 100 typedef struct employee { int id; char name[20]; int age; }emp; emp e[MAX]; int n; void create(); void display(); void modify(); void append(); void search(); void sort(); int main() { int choice; while(1) { printf(" 1.Create 2.Display 3.Modify 4.Append 5.Search 6.Sort 7.EXIT"); printf(" Enter Your Choice:"); scanf("%d",&choice); switch (choice) { case 1:create(); break; case 2:display(); break; case 3:modify(); break; case 4:append(); break; case 5:search(); break; case 6:sort(); break; default:exit(0); } } getch(); } void create() { int i; printf("Enter The No. of New Records to Be Created:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("Enter ID no.,Name,Age:"); scanf("%d%s%d",&e[i].id,e[i].name,&e[i].age); } } void display() { int i; printf("ID\tNAME\tAGE"); for(i=0;i<n;i++) { printf(" %d\t%s\t%d",e[i].id,e[i].name,e[i].age); } } void modify() { int rec,id_new,age_new; char name_new[20]; printf("Enter The Record No. To be Modified:"); scanf("%d",&rec); rec--; printf("Enter new Name:"); scanf("%s",name_new); printf("Enter new Age:"); scanf("%d",&age_new); printf("Enter new id:"); scanf("%d",&id_new); e[rec].id=id_new; e[rec].age=age_new; strcpy(e[rec].name,name_new); display(); } void append() { int rec,m,i; printf("Enter no. of Records To be Appended:"); scanf("%d",&rec); m=n+rec; for(i=n;i<m;i++) { printf("Enter ID NAME AGE of Employee:"); scanf("%d%s%d",&e[i].id,e[i].name,&e[i].age); } n=m; display(); } void search() { int id,i,flag=0; printf("Enter the ID of Employee:"); scanf("%d",&id); for(i=0;i<n;i++) { if(e[i].id==id) { printf(" Record is Found!!"); printf(" Details of Employee are as follows ID\tNAME\tAGE"); printf(" %d\t%s\t%d",e[i].id,e[i].name,e[i].age); flag=1; break; } } if(flag==0) { printf(" RECORD NOT FOUND"); } } void sort() { emp temp; int i,j; for(i=0;i<=n-2;i++) { for(j=i+1;j<=n-1;j++) { if(e[i].id>e[j].id) { temp=e[i]; e[i]=e[j]; e[j]=temp; } } } printf("SORTED LIST IS AS FOLLOWS "); display(); }

    • @Yashwant_Chavan
      @Yashwant_Chavan ปีที่แล้ว

      Addition of polynomial ❤❤ #include<stdio.h> #include<conio.h> #define MAX 10 typedef struct poly { int coeff; int power; }POLY; int main() { int m,n,i,j,k; POLY pa[MAX],pb[MAX],pc[MAX]; printf("Enter number of terms of first polynomial="); scanf("%d",&m); printf("Coefficient and Power of first polynomial="); for(i=0;i<m;i++) scanf("%d%d",&pa[i].coeff,&pa[i].power); printf("First polynomial="); for(i=0;i<m-1;i++) { printf("%dx^%d+",pa[i].coeff,pa[i].power); } if(pa[i].power==0) printf("%d",pa[i].coeff); else printf("%dx^%d",pa[i].coeff,pa[i].power); printf(" Enter number of terms of second polynomial="); scanf("%d",&n); printf("Coefficient and Power of second polynomial="); for(i=0;i<n;i++) scanf("%d%d",&pb[i].coeff,&pb[i].power); printf("Second polynomial="); for(i=0;i<n-1;i++) { printf("%dx^%d+",pb[i].coeff,pb[i].power); } if(pb[i].power==0) printf("%d",pb[i].coeff); else printf("%dx^%d",pb[i].coeff,pb[i].power); i=0;j=0;k=0; while(i<m&&j<n) { if(pa[i].power==pb[j].power) { pc[k].coeff=pa[i].coeff+pb[j].coeff; pc[k].power=pa[i].power; i++;j++;k++; } else { if(pa[i].power>pb[j].power) { pc[k]=pa[i]; i++;k++; } else { pc[k]=pb[j]; j++;k++; }}} while(i<m) { pc[k]=pa[i]; i++;k++; } while(j<n) { pc[k]=pb[i]; j++;k++; } printf(" Addition of two polynomial="); for(i=0;i<k-1;i++) { printf("%dx^%d+",pc[i].coeff,pc[i].power); } if(pc[i].power==0) printf("%d",pc[i].coeff); else printf("%dx^%d",pc[i].coeff,pc[i].power); return 0; }

  • @शांतारामगेमर
    @शांतारामगेमर ปีที่แล้ว

    #include <stdio.h> #define LEN 256 int main () { FILE * fp; int i; /* open the file for writing*/ fp = fopen ("E:\mk.txt","w"); /* write 10 lines of text into the file stream*/ for(i = 0; i < 10;i++){ fprintf (fp, "This is line %d ",i + 1); } /* close the file*/ fclose (fp); return 0; }

    • @buzzurichannel9170
      @buzzurichannel9170 ปีที่แล้ว

      ​@@Thakur_shaab-s5pis easy then you can see new line when run

    • @Yashwant_Chavan
      @Yashwant_Chavan ปีที่แล้ว

      #include<stdio.h> // Including the standard I/O library for input and output operations #include<conio.h> // Including a library that provides console I/O operations - specific to some older compilers, not widely used #define MAX 10 // Defining a constant MAX with a value of 10 typedef struct poly // Defining a structure named poly to hold coefficient and power { int coeff; int power; } POLY; int main() { int m, n, i, j, k; // Declaring variables m, n, i, j, k for use within the program POLY pa[MAX], pb[MAX], pc[MAX]; // Declaring arrays of structures to store polynomials printf("Enter number of terms of first polynomial="); // Prompting the user to input the number of terms in the first polynomial scanf("%d", &m); // Scanning the number of terms provided by the user for the first polynomial printf("Coefficient and Power of first polynomial="); // Prompting the user to input coefficients and powers for the first polynomial for (i = 0; i < m; i++) { scanf("%d%d", &pa[i].coeff, &pa[i].power); // Scanning coefficients and powers for the first polynomial } printf("First polynomial="); // Printing the first polynomial for (i = 0; i < m - 1; i++) { printf("%dx^%d+", pa[i].coeff, pa[i].power); // Printing each term of the first polynomial } if (pa[i].power == 0) { printf("%d", pa[i].coeff); // Handling the last term if the power is 0 } else { printf("%dx^%d", pa[i].coeff, pa[i].power); // Handling the last term if the power is not 0 } // Similar operations are performed for the second polynomial input and display // ... // Polynomial addition logic // ... printf(" Addition of two polynomial="); // Displaying the result of polynomial addition for (i = 0; i < k - 1; i++) { printf("%dx^%d+", pc[i].coeff, pc[i].power); // Printing the resultant polynomial } if (pc[i].power == 0) { printf("%d", pc[i].coeff); // Handling the last term if the power is 0 } else { printf("%dx^%d", pc[i].coeff, pc[i].power); // Handling the last term if the power is not 0 } return 0; // Indicating successful execution and termination of the program }

  • @sakshikatkar3562
    @sakshikatkar3562 ปีที่แล้ว

    How to write the comment ??

    • @elorvn
      @elorvn ปีที่แล้ว

      Use keys

  • @Knowledgeatfingertips-d1n
    @Knowledgeatfingertips-d1n ปีที่แล้ว

    Song name¿

  • @Grizkidz
    @Grizkidz ปีที่แล้ว

    I know how to speak hindi too

  • @devanshmaudgil5196
    @devanshmaudgil5196 ปีที่แล้ว

    Bhaii shuruaat k liye aacha h ye bss aage heavy code chaloge to bahot bekaar h

    • @Grizkidz
      @Grizkidz ปีที่แล้ว

      yah kaise bekaar hai mujhe lagata hai ki yah bahut madad karata hai agar aapako lagata hai ki aap phoohad nahin hain

    • @sumitvishwakarma1075
      @sumitvishwakarma1075 ปีที่แล้ว

      @@Grizkidz isme bas code likh sakte ho programming nahi karsakte