by Dinesh Thakur Category: C Programming (Pratical)

In this example, the if-else-if ladder takes decision based on the value of percentage of marks (percentage) calculated and displays the appropriate division. Here, the value of the percentage calculated for inputted data 80 50 75 evaluates to be 68.33. On the basis of this value, the first condition in if-else-if ladder (percentage>=60 & percentage<100) which evaluates to be true so it displays the message First Division and skip the remaining conditions.

 
by Dinesh Thakur Category: C Programming (Pratical)

The roots of a quadratic equation are real if discriminator b2-4ac is greater than or equal to zero; otherwise they are complex conjugate. However, if the roots are complex conjugate, i.e., if b2-4ac<0, the evaluation of expression sqrt (b*b-4*a*c) causes a domain error and the program halts abruptly.

 
by Dinesh Thakur Category: C Programming (Pratical)

In this program user ask to check whether the number is even, odd, -ve, +ve. For this user need to use control statement like if-else. User put the condition if (a==0) then number is zero. if (a%2==0 && a>0) number is even and positive. if (a%2==0 && a<0) number is even and negative or if (a%2!=0 && a>0) number is odd and positive these are some conditions to verify the number pahse. And display result on the screen.

 
by Dinesh Thakur Category: C Programming (Pratical)

In this program, an array type variables with elements (10) created for which contain the data as required for them. These created variables are character (char) type data type. These variables will use to contain the string data that is been used for the checking condition as required for string functions. And in the End the data entered will be displayed on the screen.



 
by Dinesh Thakur Category: C Programming (Pratical)

In the program integer type variable declare(x,y) which contains the value. To swap the variables we need to declare them with unique values. To swap the variables without using third variable and in this case we also do not use the Temp (temporary) variable. Some operators for manipulation used for swapping the variable.

 
by Dinesh Thakur Category: C Programming (Pratical)

In this program user will find out the average of students scores. To perform this action the required info and variables are essentials. Like user declare array type variable and float type that will contain the value to be declared. After that user ask to enter the value like subject marks in the end process user add all the scores and divide them all with total subjects to find out the average of students. And to use printing method shown out the result on the screen.

 
by Dinesh Thakur Category: C Programming (Pratical)

If the amount deposited in a bank (i.e., principal), number of years and interest rate are denoted asp, n and r, respectively, compound interest (compounded annually) as p(1+r/100)n. The program segment given below calculates and prints compound interest on deposit.

 
by Dinesh Thakur Category: C Programming (Pratical)

This is c program that asks user to find out the Area of a circle. User need to declare the math function header file for calculation along with required variables like radius or area. User asks to enter radius of a circle for find out the area. User then uses the method to find out the area of a circle. Then too display result on the screen as result.

 
by Dinesh Thakur Category: C Programming (Pratical)

In this program user ask to convert all the lower case character into uppercase. For this user declare two variable named lower and upper. Here in the program user ask to enter the character for converting. Then user use the method to convert like puts the lower variable into getchar() condition whenever it gets character it will turn into uppercase and then trespass the value to upper variable and print them in the end with printing method.

 
by Dinesh Thakur Category: C Programming (Pratical)

The function call pow(a, b) is used to evaluate ab, The pow function gives a domain error if the value of a is zero and b is less than or equal to zero or if a is negative and b is not an integer.

 
by Dinesh Thakur Category: C Programming (Pratical)

This is C program that asks user to find out the size of int. there are too many data types in programming languages. All are same in using like any content acquired the memory as well as data types also acquire the memory like char, integer, float or double etc. integer data type acquire the 2 bytes. This is the program that uses to define the data type memory acquiring status. Using some methods to find out the display as result.



 
by Dinesh Thakur Category: C Programming (Pratical)

The function sizeof () gives the number of bytes allocated to store the argument of the function. For example, sizeof (x) will give the numbers of bytes allocated for storing x. Similarly, sizeof (int) will give number of bytes allocated for storing an int number. The number of bytes allocated for a particular data type depends on the computer system, the operating system, and the compiler used.



 
by Dinesh Thakur Category: C Programming (Pratical)

This is C program that asks user to define the size of data types acquired by them. Data types are known as those elements that tells the user which kind of data elements they have for example integer type for numeric value, char type for characters. All the data types have their limits for numerical expressions like char is 0-255 bits.



 
by Dinesh Thakur Category: C Programming (Pratical)

This is C program that asks user to print a menu screen on display. For this user declare some variables to storing the value in it. Here user uses currency converter method for menu screen. User only prints the message to currency conversion. And some new line tag or space tag used for space ad new line composition. printing the quoted message on the screen as the result.

 
by Dinesh Thakur Category: C Programming (Pratical)

In this program the two numbers to be swapped from each other place with the use of third variable. In program the variables declare for storing the value in it. Here three variables are also declared (a,b,c) the use of only two numbers the swapping will happen. The first number shifted to third variable and then to other variable the reverse phase will be on the move to swap both numbers. And other functionality also comes in light for displaying the result on the screen.

 
by Dinesh Thakur Category: C Programming (Pratical)

 This is C Program for define the Bitwise operator. Binary system operator known as bitwise operator like Left shift or right shift operator. The operands value is moved left or right by the number of bits specified by the operand position right or left. To define this condition user declares the variables c1, c2, c3. Here user define char type variables and define the value as static mode manually. User put the condition to define bitwise operator c3 = c1 & c2. And display output as result on the screen.

 
by Dinesh Thakur Category: C Programming (Pratical)

This is the C program for converting a character into ASCII value.

 
by Dinesh Thakur Category: C Programming (Pratical)

This is C program that ask user to define the Bitwise XOR operator. This operator in C compares each bit of its first operand to the corresponding bit of its second operand. If one bit is 0 and the other bit is 1, the result will bit is set to 1 Otherwise 0.

 

Page 7 of 9



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.