Knowledge in C programs

C break statement

C break statementThe break is a keyword in C which is used to bring the program control out of the loop. The break statement is used inside loops or switch statement. The break statement breaks the loop one by one, i.e., in the case of nested loops, it breaks the inner loop first and then proceeds to outer loops. The break statement in C can be used in the following two scenarios:With switch caseWith loopSyntax://loop or switch case   break; Example#include<stdio.h>  #include<stdlib.h>  void main ()  {      int i;      for(i = 0; i<10; i++)      {          printf("%d ",i);          if(i == 5)          break;      }      printf("came outside of loop i = %d",i);        }  Output0 1 2 3 4 5 came outside of loop i = 5

C continue statement

C continue statementThe continue statement in C language is used to bring the program control to the beginning of the loop. The continue statement skips some lines of code inside the loop and continues with the next iteration. It is mainly used for a condition so that we can skip some code for a particular condition.Syntax://loop statements  continue;  //some lines of the code which is to be skipped  Continue statement example 1#include<stdio.h>  void main ()  {      int i = 0;       while(i!=10)      {          printf("%d", i);           continue;           i++;      }  }  Output infinite loop

C goto statement

C goto statementThe goto statement is known as jump statement in C. As the name suggests, goto is used to transfer the program control to a predefined label. The goto statment can be used to repeat some part of the code for a particular condition. It can also be used to break the multiple loops which can't be done by using a single break statement. However, using goto is avoided these days since it makes the program less readable and complecated.Syntax:label:   //some part of the code;   goto label; goto exampleLet's see a simple example to use goto statement in C language.#include <stdio.h>  int main()   {    int num,i=1;     printf("Enter the number whose table you want to print?");     scanf("%d",&num);    table:     printf("%d x %d = %d\n",num,i,num*i);    i++;    if(i<=10)    goto table;    }  Output:Enter the number whose table you want to print?10 10 x 1 = 10 10 x 2 = 20 10 x 3 = 30 10 x 4 = 40 10 x 5 = 50 10 x 6 = 60 10 x 7 = 70 10 x 8 = 80 10 x 9 = 90 10 x 10 = 100

Type Casting in C

Typecasting allows us to convert one data type into other. In C language, we use cast operator for typecasting which is denoted by (type).Syntax:(type)value; Without Type Casting:int f= 9/4;  printf("f : %d\n", f );//Output: 2  With Type Casting:float f=(float) 9/4;  printf("f : %f\n", f );//Output: 2.250000  Type Casting exampleLet's see a simple example to cast int value into the float.#include<stdio.h>  int main(){  float f= (float)9/4;    printf("f : %f\n", f );    return 0;  }      Output:f : 2.250000

Programing on factorial

Knowledge about factorial in c

Pattern printing using printf

This is the basic pattern printing programs using printf statements.

Introduction to variables

This this the introduction to various variables and its data types.

Arithmetical operations in C programming

The introduction of variables is followed by mathematics operations using operators.

COMPUTER PROGRAMMING (FY) END SEMESTER 2019 QUESTION PAPER {DBATU}

This pdf contains the question paper of END SEMESTER 2019 of COMPUTER PROGRAMMING of DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY. Also the paper contains questions from whole required syllabus of COMPUTER PROGRAMMING with proper marking scheme and paper pattern.

COMPUTER PROGRAMMING MID SEMESTER QUESTION PAPER 2019 {DBATU}

This pdf contains the COMPUTER PROGRAMMING mid semester question paper of 2019. Also the paper pattern is described in well defined manner . This paper covers all essential questions from syllabus. This is conducted during winter semester examination ia DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY by COMPUTER DEPARTMENT.

PROGRAMMING

THIS PDF CONTAINS NOTES OF PROGRAMMING

PROGRAMMING

THIS PDF CONTAINS NOTES OF PROGRAMMING