Posts

Generation Of Computer | Computer Generation | कंप्यूटर की पीढ़िया

GENERATION OF COMPUTER First Generation Second Generation Third Generation Fourth Generation Fifth Generation   Generation Technology Language First Vacuum Tube Machine Language Second Transistor Assembly Language Third Integrated Circuit (I C) High Level Language (H L L) Fourth Very Large Scale Integrated Circuit (V L S I) Structural Query Language (SQL) Fifth Ultra Large Scale Integrated Circuit (U L S I) Artificial Intelligence (AI) To Know more about click the following link https://youtu.be/O7iDZIO2MAw    

Fibonacci Series In C-Gaurav Pali

Image
 Write a program in C to print the Fibonacci Series Note:- In the Fibonacci series, every next number is the sum of the previous two numbers. #include<stdio.h> #include<conio.h> void main()  {   int a=0,b=1,c,i,n;   clrscr();   printf("Input number of terms you want to print");   scanf("%d",&n);   printf("%d %d ",a,b);   for(i=1;i<=n;i++)    {     c=a+b;     a=b;     b=c;     printf("%d ",c);    }   getch();  } Program ScreenShot OutPut

Count the no of lowercase letters in a text file bca.txt in C

Image
Write a program in C to count the no of lowercase letters in a text file bca.txt This program reads one character at a time by using fgetc() function until the EOF (end of file) returns. Then it checks whether the current character is lowercase or not. If it is a lowercase letter it increments the value of c by 1. It also displays the contents of file named bca.txt. And finally print the total number of lowercase letters present in the file, which is the main purpose to write the program Program #include<stdio.h> #include<conio.h> void main()  {   FILE *fptr;   char ch;   int c=0;   if((fptr=fopen("bca.txt","r"))==NULL)    printf("File doesn't exist\n");   else    {     while((ch=fgetc(fptr))!=EOF)      {       if(ch>=97&&ch<=122) c++;       printf("%c",ch);      }    }    printf("\nTotal lowercase letter in bca.txt file ...

Input Function In Python

Image
Input Function In Python TRY THE FOLLOWING COMMANDS ONE BY ONE print("Enter your name") name=input() print("My name is "+name)   name=input("Enter your name") print("My name is "+name)   name=input("Enter your name\n") print("My name is "+name)   a=input("Enter a Number") print(a)   a=input("Enter a Number\n") print("Value of a is "+a)   a=input("Enter First Number\n") b=input("Enter Second Number\n") c=a+b print("Sum of a and b is "+c)   a=int(input("Enter First Number\n")) b=int(input("Enter Second Number\n")) c=a+b print("Sum of a and b is "+c)   a=int(input("Enter First Number\n")) b=int(input("Enter Second Number\n")) c=a+b print("Sum of a and b is "+str(c))   a=float(input("Enter First Number\n")) b=float(input("Enter Second Number\n")) c=a+b print("Sum of a and b is "+str(...

Write A Program To Perform The Addition Of 3x3 Matrices Using An Array

Image
M3-R4 O-Level Jan-20 Subjective Type M3-R4 : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE PART-2 /*Write a program to perform the addition of 3x3 matrices using an array*/ /* M3-R4 Q-6(B)*/ #include<stdio.h> #include<conio.h> void main()  {   int mat1[3][3],mat2[3][3],mat3[3][3]; /*Declare 3 Matrices of 3X3*/   int i,j;   clrscr();   printf("Enter the elements in matrix 1\n");   for(i=0;i<3;i++)    for(j=0;j<3;j++)     scanf("%d",&mat1[i][j]);    printf("Enter the elements in matrix 2\n");   for(i=0;i<3;i++)    for(j=0;j<3;j++)     scanf("%d",&mat2[i][j]);  /*Perform addition of matrix 1 and matrix 2 */   for(i=0;i<3;i++)    for(j=0;j<3;j++)     mat3[i][j]=mat1[i][j]+mat2[i][j];   printf("Result after addition of matrix 1 and matrix 2\n");   for(i=0;i<3;i++)    {     for(j=0;j<3;j++) ...

Write A Program in C To Swap Two Numbers Without Using Third Variable

Image
Write A Program in C To Swap Two Numbers Without Using Third Variable M3-R4 O-Level Jan-20  Subjective Programming Based Question M3-R4 : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE PART-1 To read about click on the following link Write A Program To Find Factorial Of Given Number Using Recursive Function https://learncomputerpci.blogspot.com/2020/07/write-program-to-find-factorial-of.html#more First Method /*Write A Program in C To Swap Two Numbers Without Using Third Variable */ #include<stdio.h> #include<conio.h> void main()  {   int num1,num2;   clrscr();   printf("Enter first number\n");   scanf("%d",&num1);   printf("Enter Second number\n");   scanf("%d",&num2);   /*you can also use scanf("%d%d",&num1,&num2) to input num1 and num2 */   printf("Before Swapping num1=%d and num2=%d\n",num1,num2);   /* Let num1=10 and num2=20 */   num1=num1+num2;    /* Value of num1 will b...

Write A Program To Find Factorial Of Given Number Using Recursive Function

Image
Write A Program To Find Factorial Of Given Number Using Recursive Function M3-R4 O-Level Jan-20 Subjective Programming Based Question 8 (A) M3-R4 : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE PART-1 Note: To read about   M3 R4 O-Level Jan-20 MCQ https://learncomputerpci.blogspot.com/2020/07/m3-r4-o-level-jan-20-mcq-with-answers.html M3 R4 O-Level Jan-20 TRUE OR FALSE https://learncomputerpci.blogspot.com/2020/07/m3-r4-o-leveljan-20-true-or-false-m3.html M3 R4 O-Level Jan-20 MATCH THE FOLLOWING https://learncomputerpci.blogspot.com/2020/07/m3-r4-o-leveljan-20-match-following-m3.html M3 R4 O-Level Jan-20 FILL IN THE BLANKS https://learncomputerpci.blogspot.com/2020/07/m3-r4-o-level-jan-20-fill-in-blanks.html