Knowledge in C program for problem solving (File Handling)

Write a program to Input 10 numbers and Output 10 numbers by using Single dimentional array.

Write a program to Input 10 numbers and Output 10 numbers by using Single dimentional array.The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a program to Input 10 numbers and Output 10 numbers by using Single dimentional array.

Write a program to Input 10 numbers and Output 10 numbers by using Single dimentional array.The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a c program to Input 4 Numbers and output 4 numbers By using Multidimentional array. (BCA first semester)

Write a c program to Input 4 Numbers and output 4 numbers By using Multidimentional array. (BCA first semester) .The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a program to Enter 4 Numbers and assamble in Assending order By using Multidimentional array.

Write a program to Enter 4 Numbers and assamble in Assending order By using Multidimentional array. The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a program to Enter 4 Numbers and assamble in Assending order By using Multidimentional array.

Write a program to Enter 4 Numbers and assamble in Assending order By using Multidimentional array. The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a program To enter 5 Number and assambe in assanding Order By using Single Dimentional array.

Write a program To enter 5 Number and assambe in assanding Order By using Single Dimentional array. The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a program To enter 5 Number and assambe in assanding Order By using Single Dimentional array.

Write a program To enter 5 Number and assambe in assanding Order By using Single Dimentional array. The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

Write a program To enter 5 Number and assambe in assanding Order By using Single Dimentional array.

Write a program To enter 5 Number and assambe in assanding Order By using Single Dimentional array. The greatest Number. Programming with C (First semester ) Makhanlal chaturvedi national and jounalism university,Bhopal class notes of C programming from Makhanlal Chaturvedi national journalism and communication university,Bhopal. Share with your friends to Help them to learn c programming. This class notes is very important for BCA first semester students .

C Programs

C Programming Language TutorialC language Tutorial with programming approach for beginners and professionals, helps you to understand the C language tutorial easily. Our C tutorial explains each topic with programs.The C Language is developed for creating system applications that directly interact with the hardware devices such as drivers, kernels, etc.C programming is considered as the base for other programming languages, that is why it is known as mother language.It can be defined by the following ways:Mother languageSystem programming languageProcedure-oriented programming languageStructured programming languageMid-level programming language1) C as a mother languageC language is considered as the mother language of all the modern programming languages because most of the compilers, JVMs, Kernels, etc. are written in C language, and most of the programming languages follow C syntax, for example, C++, Java, C#, etc.It provides the core concepts like the array, strings, functions, file handling, etc. that are being used in many languages like C++, Java, C#, etc.2) C as a system programming languageA system programming language is used to create system software. C language is a system programming language because it can be used to do low-level programming (for example driver and kernel). It is generally used to create hardware devices, OS, drivers, kernels, etc. For example, Linux kernel is written in C.It can't be used for internet programming like Java, .Net, PHP, etc3) C as a procedural languageA procedure is known as a function, method, routine, subroutine, etc. A procedural languagespecifies a series of steps for the program to solve the problem.A procedural language breaks the program into functions, data structures, etc.C is a procedural language. In C, variables and function prototypes must be declared before being used.4) C as a structured programming languageA structured programming language is a subset of the procedural language. Structure means to break a program into parts or blocks so that it may be easy to understand.In the C language, we break the program into parts using functions. It makes the program easier to understand and modify.

printf() and scanf() in C

printf() and scanf() in Cprintf() functionThe printf() and scanf() functions are used for input and output in C language. Both functions are inbuilt library functions, defined in stdio.h (header file).printf() functionThe printf() function is used for output. It prints the given statement to the console.The syntax of printf() function is given below:printf("format string",argument_list); scanf() functionThe scanf() function is used for input. It reads the input data from the console.scanf("format string",argument_list); 

C if else Statement

C if else StatementThe if-else statement in C is used to perform the operations based on some specific condition. The operations specified in if block are executed if and only if the given condition is true.There are the following variants of if statement in C language.If statementIf-else statementIf else-if ladderNested ifIf StatementThe if statement is used to check some given condition and perform some operations depending upon the correctness of that condition. It is mostly used in the scenario where we need to perform the different operations for the different conditions. The syntax of the if statement is given below.if(expression){  //code to be executed  } Let's see a simple example of C language if statement.#include<stdio.h>    int main(){    int number=0;    printf("Enter a number:");    scanf("%d",&number);    if(number%2==0){    printf("%d is even number",number);    }    return 0;  }    OutputEnter a number:4 4 is even number enter a number:5 If-else StatementThe if-else statement is used to perform two operations for a single condition. The if-else statement is an extension to the if statement using which, we can perform two different operations, i.e., one is for the correctness of that condition, and the other is for the incorrectness of the condition. Here, we must notice that if and else block cannot be executed simiulteneously. Using if-else statement is always preferable since it always invokes an otherwise case with every if condition. The syntax of the if-else statement is given below.if(expression){  //code to be executed if condition is true  }else{  //code to be executed if condition is false  } Let's see the simple example to check whether a number is even or odd using if-else statement in C language.#include<stdio.h>    int main(){    int number=0;    printf("enter a number:");    scanf("%d",&number);     if(number%2==0){    printf("%d is even number",number);    }    else{    printf("%d is odd number",number);    }     return 0;  }    Outputenter a number:4 4 is even number enter a number:5 5 is odd number

C Switch Statement

C Switch StatementThe switch statement in C is an alternate to if-else-if ladder statement which allows us to execute multiple operations for the different possibles values of a single variable called switch variable. Here, We can define various statements in the multiple cases for the different values of a single variable.The syntax of switch statement in c language is given below:switch(expression){    case value1:     //code to be executed;     break;  //optional  case value2:     //code to be executed;     break;  //optional  ......        default:      code to be executed if all cases are not matched;    }  Rules for switch statement in C language1) The switch expression must be of an integer or character type.2) The case value must be an integer or character constant.3) The case value can be used only inside the switch statement.4) The break statement in switch case is not must. It is optional. If there is no break statement found in the case, all the cases will be executed present after the matched case. It is known asfall through the state of C switch statement.Let's try to understand it by the examples. We are assuming that there are following variables.int x,y,z;  char a,b;  float f; Switch case example 2#include <stdio.h>  int main()  {      int x = 10, y = 5;       switch(x>y && x+y>0)      {          case 1:           printf("hi");          break;           case 0:           printf("bye");          break;          default:           printf(" Hello bye ");      }             }  Outputhi