Skip to main content

Posts

Showing posts with the label Class 10th Chapter

ads1

Class 10th chapter :- 15 ARRAYS

  Arrays It is a collection of elements having same data type, It is a fixed-size sequential collection of elements. An array element occupies contiguous memory locations. C supports a special kind of data type called an array. The element of an array is accessed by an index number. The index number contained within square brackets is also known as subscript. Types of Arrays The arrays in C language can be classified in to following two categories : (1) Single or One dimensional array (2) Multidimensional array The single dimensional array may have one row or one column while multidimensional array has one or more rows and one or more columns. The number of rows and columns are specified by user as per the program requirement.  Declaration of Single Dimensional Array To declare an array in C language, we specify the type of data which we want to store in the elements and the number of elements to be stored in an array as follows: datatype arrayname ( size ); datatype: It specify the ty

class 10 Chapter :- 13 Decision Structures

 Decision Structures Decision structure statements help us to jump from one part of the program to another part of program based on result of some conditions. Sometimes decision structure statements are also known as selective structures statements, branching statements or decision making statements. C language provides two basic types of decision structure statements: if and switch. The if Statement The if statement is one of the powerful decision making statement which can be used to transfer control of instruction execution. The if statement can be used in following different ways: Simple if statement if-else statement nested if statement and else-if ladder statement Simple if statement :- The simplest form of the decision structure statement is the if statement. It is frequently used in the program for decision making and allowing us to change the flow of program execution Nested if...else statement There are situations where we need to execute series of decisions in our program.

Class 10th Chapter 12 Using I/O Operations

 Using I/O Operations   All programming languages allow to read input (known as input operations) and to write output (known as output operations). Input/Output operations are more popularly known as I/O operations. The C language does not have any built-in statement to perform input and output operation. C language does not have any built-in statement to perform input and output operation. These data input and output operations are carried out by the standard input/output built-in library functions. So far we have used scanf() as a standard input and printf() as a standard output function in our programs. I/O operations using functions like getchar), getch(), getso, scanfo, printf(), putcharo, putc(), puts(), etc. To use any inbuilt function from C library, we have to include respective library of that function in the beginning of program using #include statement. #include<stdio.h> The name stdio.h stands for standard input-output header file. This header file contains various i

ads2