15
RAJAJI INSTITUTE OF TECHNOLOGY, SALEM-636 308 BOARD PRACTICAL EXAMINATIONS, OCTOBER-2012 “PROGRAMMING IN C” PRACTICAL Year/Sem : II/III Sub Code : 24036 Date : 11.10.2012 Duration : 3 Hrs PART – A 1. Write a C Program to calculate Simple and Compound interest 2. Write a C Program to swap two variables using (i) third variable and (ii) without using a third variable. 3. Write a C Program to find the largest number between given three numbers. 4. Program to check whether the given string is palindrome or not. 5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string. 6. Program to prepare the total marks for N students by reading the Regno,, Name, Mark1 toMark6 by using array of structures. . 7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function 8. Using pointers, find the length of the given string. 9. Write a program to print the address of a variable and increase the content by 5 and print the new value. PART – B 1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order. 2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE) 3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion 4. Write a program to arrange the given N names in alphabetical order. 5. Write a program to read a string S1 from the terminal. Again read a string S2 from

c Programming Practical

Embed Size (px)

DESCRIPTION

C PROGRAMMING

Citation preview

Page 1: c Programming Practical

RAJAJI INSTITUTE OF TECHNOLOGY, SALEM-636 308BOARD PRACTICAL EXAMINATIONS, OCTOBER-2012

“PROGRAMMING IN C” PRACTICAL

Year/Sem : II/III Sub Code : 24036Date : 11.10.2012 Duration : 3 Hrs

PART – A

1. Write a C Program to calculate Simple and Compound interest2. Write a C Program to swap two variables using (i) third variable and (ii) without using a third variable.3. Write a C Program to find the largest number between given three numbers.4. Program to check whether the given string is palindrome or not.5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.6. Program to prepare the total marks for N students by reading the Regno,, Name, Mark1 toMark6 by using array of structures. .7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function8. Using pointers, find the length of the given string.9. Write a program to print the address of a variable and increase the content by 5 and print the new value.

PART – B

1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order.2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE)3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion4. Write a program to arrange the given N names in alphabetical order.5. Write a program to read a string S1 from the terminal. Again read a string S2 from the terminal and check the given string S2 in the string S1. If it does, remove string S2 from the string S1 and print the updated string S1. ( For example S1 = Concatenate and S2 = cat , then the final result should be “Conenate”6. Program to read ten values to an array variable. Use pointers to locate and display each value.7. Reverse the following using pointers ( i) String ( ii) N integer numbers stored in any array.8. Write a C program to print the abbreviation of an Organization Name. ( For example if the input is “BHARAT HEAVY ELECTRONICS LIMITED” , then the output should be “BHEL”.)9. Program to copy contents of one file to another file. Also find the number of characters, lines and words in the above file.

INTERNAL EXAMINER EXTERNAL EXAMINERMr.KARTHIK K Mr.JAYAKAR MLECT/COMPUTER Sr.LECT/ECE362,RIT,SALEM 326,SPT,SALEM

Page 2: c Programming Practical

RAJAJI INSTITUTE OF TECHNOLOGY, SALEM-636 308BOARD PRACTICAL EXAMINATIONS, OCTOBER-2012

“PROGRAMMING IN C” PRACTICAL

Year/Sem : II/III Sub Code : 24036Date : 11.10.2012 Duration : 3 Hrs

PART – A

1. Write a C Program to calculate Simple and Compound interest2. Write a C Program to swap two variables using (i) third variable and (ii) without using a third variable.3. Write a C Program to find the largest number between given three numbers.4. Program to check whether the given string is palindrome or not.5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.6. Program to prepare the total marks for N students by reading the Regno,, Name, Mark1 toMark6 by using array of structures. .7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function8. Using pointers, find the length of the given string.9. Write a program to print the address of a variable and increase the content by 5 and print the new value.

PART – B

1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order.2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE)3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion4. Write a program to arrange the given N names in alphabetical order.5. Program to read ten values to an array variable. Use pointers to locate and display each value.6. Reverse the following using pointers ( i) String ( ii) N integer numbers stored in any array.7. Write a C program to print the abbreviation of an Organization Name. ( For example if the input is “BHARAT HEAVY ELECTRONICS LIMITED” , then the output should be “BHEL”.)8. Write a program to read a string S1 from the terminal. Again read a string S2 from the terminal and check the given string S2 in the string S1. If it does, remove string S2 from the string S1 and print the updated string S1. ( For example S1 = Concatenate and S2 = cat , then the final result should be “Conenate”9. Program to copy contents of one file to another file. Also find the number of characters, lines and words in the above file.

INTERNAL EXAMINER EXTERNAL EXAMINERMr.KARTHIK K Mr.JAYAKAR M

Page 3: c Programming Practical

LECT/COMPUTER Sr.LECT/ECE362,RIT,SALEM 326,SPT,SALEM

PART-A6. Program to prepare the total marks for N students by reading the Regno,, Name, Mark1 toMark6 by using array of structures. .

PART-B9. Program to copy contents of one file to another file. Also find the number of characters, lines and words in the above file.

PART-A4. Program to check whether the given string is palindrome or not.

PART-B8. Write a C program to print the abbreviation of an Organization Name. ( For example if the input is “BHARAT HEAVY ELECTRONICS LIMITED” , then the output should be “BHEL”.)

PART-A1. Write a C Program to calculate Simple and Compound interest

PART-B

7. Reverse the following using pointers ( i) String ( ii) N integer numbers stored in any array.

PART-A3. Write a C Program to find the largest number between given three numbers.

PART-B6. Program to read ten values to an array variable. Use pointers to locate and display each value.

Page 4: c Programming Practical

PART-A2. Write a C Program to swap two variables using (i) third variable and (ii) without using a third variable.

PART-B5. Write a program to read a string S1 from the terminal. Again read a string S2 from the terminal and check the given string S2 in the string S1. If it does, remove string S2 from the string S1 and print the updated string S1. ( For example S1 = Concatenate and S2 = cat , then the final result should be “Conenate”.

PART-A9. Write a program to print the address of a variable and increase the content by 5 and print the new value.

PART-B4. Write a program to arrange the given N names in alphabetical order.

PART-A7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function

PART-B

3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion

PART-A8. Using pointers, find the length of the given string.

PART-B2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE)

Page 5: c Programming Practical

PART-A5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.

PART-B1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order.

PART-A1. Write a C Program to calculate Simple and Compound interest

PART-B8. Write a C program to print the abbreviation of an Organization Name. ( For example if the input is “BHARAT HEAVY ELECTRONICS LIMITED” , then the output should be “BHEL”.)

PART-A2. Write a C Program to swap two variables using (i) third variable and (ii) without using a third variable PART-B6. Program to read ten values to an array variable. Use pointers to locate and display each value.

PART-A3. Write a C Program to find the largest number between given three numbers.

PART-B5. Write a program to read a string S1 from the terminal. Again read a string S2 from the terminal and check the given string S2 in the string S1. If it does, remove string S2 from the string S1 and print the updated string S1. ( For example S1 = Concatenate and S2 = cat , then the final result should be “Conenate”

Page 6: c Programming Practical

PART-A4. Program to check whether the given string is palindrome or not.

PART-B2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE)

PART-A5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.

PART-B7. Reverse the following using pointers ( i) String ( ii) N integer numbers stored in any array.

PART-A6. Program to prepare the total marks for N students by reading the Regno,, Name, Mark1 toMark6 by using array of structures. .

PART-B9. Program to copy contents of one file to another file. Also find the number of characters, lines and words in the above file.

PART-A7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function

PART-B4. Write a program to arrange the given N names in alphabetical order.

Page 7: c Programming Practical

PART-A8. Using pointers, find the length of the given string.

PART-B1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order.

PART-A9. Write a program to print the address of a variable and increase the content by 5 and print the new value.

PART-B

3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion

PART-A1. Write a C Program to calculate Simple and Compound interest

PART-B8. Write a C program to print the abbreviation of an Organization Name. ( For example if the input is “BHARAT HEAVY ELECTRONICS LIMITED” , then the output should be “BHEL”.)

PART-A2. Write a C Program to swap two variables using (i) third variable and (ii) without using a third variable PART-B6. Program to read ten values to an array variable. Use pointers to locate and display each value.

Page 8: c Programming Practical

PART-A3. Write a C Program to find the largest number between given three numbers.

PART-B5. Write a program to read a string S1 from the terminal. Again read a string S2 from the terminal and check the given string S2 in the string S1. If it does, remove string S2 from the string S1 and print the updated string S1. ( For example S1 = Concatenate and S2 = cat , then the final result should be “Conenate”

PART-A4. Program to check whether the given string is palindrome or not.

PART-B2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE)

PART-A5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.

PART-B7. Reverse the following using pointers ( i) String ( ii) N integer numbers stored in any array.

PART-A6. Program to prepare the total marks for N students by reading the Regno,, Name, Mark1 toMark6 by using array of structures. .

PART-B9. Program to copy contents of one file to another file. Also find the number of characters, lines and words in the above file.

Page 9: c Programming Practical

PART-A7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function

PART-B4. Write a program to arrange the given N names in alphabetical order.

PART-A8. Using pointers, find the length of the given string.

PART-B1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order.

PART-A9. Write a program to print the address of a variable and increase the content by 5 and print the new value.

PART-B

3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion

PART-A9. Write a program to print the address of a variable and increase the content by 5 and print the new value.

PART-B4. Write a program to arrange the given N names in alphabetical order.

Page 10: c Programming Practical

PART-A7. Write a function to calculate the sum and average of given three numbers. Write a main function to call the above function

PART-B

3. Write a program to find the factorial of a given number (i) Without recursion (ii)With recursion

PART-A8. Using pointers, find the length of the given string.

PART-B2. Using Switch… Case Statement, print the given number into equivalent Word. ( For example if the input is 3, then the output should be THREE)

PART-A5. Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.

PART-B1. Read an integer number. Find the number of digits and sum of all individual digits and also print the above number in reverse order.

PART-A1. Write a C Program to calculate Simple and Compound interest

PART-B8. Write a C program to print the abbreviation of an Organization Name. ( For example if the input is “BHARAT HEAVY ELECTRONICS LIMITED” , then the output should be

Page 11: c Programming Practical

“BHEL”.)

RAJAJI INSTITUTE OF TECHNOLOGY, SALEM-636 308BOARD PRACTICAL EXAMINATIONS, OCTOBER-2012

“PROGRAMMING IN C” PRACTICAL

Year/Sem : II/III Sub Code : 24036Date : 11.10.2012 Duration : 3 Hrs

.

MARK ALLOCATION TABLE

Writing any one program from PART-A 10

Writing any one program from PART-B 15

Executing the program(PART-A) 15

Executing the program(PART-B) 20

Result with printout(PART-A) 5

Result with printout(PART-B) 5

VIVA-VOCE 5

TOTAL 75

INTERNAL EXAMINER EXTERNAL EXAMINERMr.KARTHIK K Mr.JAYAKAR MLECT/COMPUTER Sr.LECT/ECE362,RIT,SALEM 326,SPT,SALEM