#### Category : CPL LAB

C PROGRAMMING LABORATORY SYLLABUSSUBJECT CODE &#821..

7. Implement using functions to check whether the given number is prime and display appropriate messages. (No built-in math function) ALGORITHM: Step 1: Start  Step 2: [Read the value of N(positive integers)]     Read N  Step 3: [to check whether N is prime or not] For i=2 to m/2  If m%i=0 then go to ..

12. Develop a program to find the square root of a given number N and execute for all possible inputs with appropriate messages. Note: Donâ€™t use library function sqrt(n).Algorithm: Step 1: start Step 2: read number Step 3: calculate number to the power of 0.5(sq=pow(n,0.5)) Step 4: print sq Step 5: stop FLOWCHART: PROGRAM:#include<stdio.h>#include<math.h> int ..

3. Develop a program to compute the roots of a quadratic equation by accepting the coefficients. Print appropriate messages.Algorithm: Step1:[read the values of A,B and C]       Read A,B,C Step2:[check for the co-efficients]      If  A=0 and B=0 and C=0       Then roots are non-determinant Step 3:[compute the value of Disc]    ..

13. Implement structures to read, write, compute average- marks and the students scoring above and below the average marks for a class of N students.ALGORITHM: STEP 1: [input number of students] Read n STEP 2: [input details of students ie.name and marks] Read name,m1,m2,m3 STEP 3: [ Calculate total and average] For <- i=0 to ..

6. Introduce 1D Array manipulation and implement Binary search.Algorithm: Step 1:[read the value of N]     Read N Step 2:[Enter the elements in ascending order] For i=0 to N-1 is to be read from the keyboard Step 3:[Enter the one element for searching that could be a key element] Step 4: initially set low=0 and ..

1. Familiarization with computer hardware and programming environment, concept of naming the program files, storing, compilation, execution and debugging, taking any simple C- code. [Not included in the Lab Exam ] Generally, the programs created using programming languages like C, C++, Java etc., are written using high level language like English. But, computer cannot understand ..