0% found this document useful (0 votes)
29 views7 pages

Important Programs For External Exam

The document outlines a series of C programming tasks and questions for an external exam, including programs for checking palindromes, generating Fibonacci sequences, sorting, searching, and handling arrays. It also includes theoretical questions about data structures, algorithms, and file I/O functions. The content is divided into units with 2-mark and 10-mark questions covering various C programming concepts.

Uploaded by

tg55arun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views7 pages

Important Programs For External Exam

The document outlines a series of C programming tasks and questions for an external exam, including programs for checking palindromes, generating Fibonacci sequences, sorting, searching, and handling arrays. It also includes theoretical questions about data structures, algorithms, and file I/O functions. The content is divided into units with 2-mark and 10-mark questions covering various C programming concepts.

Uploaded by

tg55arun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

IMPORTANT PROGRAMS FOR EXTERNAL EXAM

1. write a c program to check if the given number is palindrome or not?


EX: 13231
2. write a c program to check if the given string is palindrome or not?
Ex: abcdcba
3. write a c program to display Fibonacci sequence?
4. write a c program to print the Fibonacci sequence to the given „n‟ terms using recursion ?
5. write a c program to print prime numbers up to a given number using while loop?
6. write a c program to find out factorial of given number?
7. read array of elements and divide the given elements into two categories i)odd elements ii)even
elements. For Example:
array a[]={1,7,6,3,2,5,8}, then odd array b[]={1,7,3,5}, even array c[]={6,2,8}
8. write a c program to perform linear search for given elements a[]={10,20,30,40,70,110,150,170}
and search element is 110.?
9. write a c program to perform bubble sort for given elements a[]={54,26, 93 ,17, 77, 31, 44, 55, 20}
10. write a c program to perform binary search for given elements
a[]={10,20,30,40,60,70,100,110,150,170,190} and search element is 40.?
11. Write a program in C for 2d array of size 3*3 and print the matrix?
12. Write a program that reads in a sequence of characters and print them in reverse order using stack?
13. Write a program in C to read n number of values in an array and display it in reverse order?
14. Write a program in C to find the second largest element in an array?
15. write a c program to print the college code by reading 10 digit alpha numeric hall ticket number? if
the college is k9 display the college name as “TKRCET”

sample output1:
enter your hall ticket no: 17K91A0221
your college code is k9 and you are belongs to TKRCET

sample output2:
enter your hall ticket no: 17K11A0221
your college code is k9 and you are not belongs to TKRCET
UNIT – I
2_MARKS
1. What are the types of number system?
2. Define decimal number system?
3. What is Binary number system?
4. What is Octal number system?
5. What is Hexa decimal number system?
6. What is C Language?
7. What is an algorithm?
8. Describe Type casting with example?
9. Give the size of each datatype in C?
10. Give a statement on “void” datatype in C.
11. What is an operator.name 3operators?
12. What is precedence and Associativity?
13. Explain conditional operator and its syntax.
14. What are the properties of an algorithm?
15. What is the difference between compiler and Interpreter?

10_MARKS
1. Explain about the number system in detail with an example.
2. Describe about the different data types in C with an example.
3. Briefly explain about the different operators in C with an example.
OR
What are the types of operators? Explain the working of ternary Operator with example
4. What is the difference between pre increment and post increment operator and give an
example for each operator.
5. Write a c program for the following series
i) 1 + 2 + ……….. + N = n(n+1) / 2
II) 1 2 + 2 2 + ……… + N 2 = n(n+1)(2n+1) / 6
6. A) Explain about the arithmetic operator.
B) Write a C program for Addition of two numbers.
7. Explain about the selection statements in C.
8. Compare while and do while loop with an example.
9. What is the difference between break and continue? Explain.
10. What are the Computer languages?
OR
Define high level language over machine language? Explain advantages and disadvantages.
11. Explain bitwise operators of C with example?
12. Explain various decision making statements used in c? Give examples.
13. Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied by the
user.
14. Explain various looping statements in C with example?
15. Explain conditional statements with examples?
16. What are the different types of control statements available „C‟?
17. Explain switch statement with its syntax and example. what is the purpose of using break in switch.
18. What is conditional operator (turnery)?Write a C program to find the maximum of three numbers using
conditional operators.
19. What are the I/O functions in c? Explain with example.
OR
Discuss in detail about formatted I/O.
20. What is an algorithm .What are properties of algorithm and give algorithm for factorial of two numbers.
21. Explain the structure of C program.
UNIT – II

2-MARKS
1)Differentiate linear and non-linear data structures.
2) Elucidate stack operations.
3) Elucidate queue operations.
4) Define an array? how to declare an array?
5) What are the applications of an array?
6) What is the use of sorting algorithms?
7) Differentiate stack and queue.
8) what is tree?
9)What is graph?
10)what is searching?
11)What is sorting?
12)What is Linked list?
13) Define a term data structure.

10-MARKS
1) Briefly discuss about data structures in C.
OR
Explain the following:
a) Linear data stricture b) Non-Linear Data a structure
2) Elaborate Binary search technique with an example.
OR
Explain the concept of Binary search along example program.
3) Elaborate linear search technique with an example.
OR
Explain the concept of linear (sequential) search along example program.

4)Write a C language program to read two matrices and add them.


5) Write a C language program to read two matrices and multiply them.
6)Write a C language program to read n numbers in an array and split the array into two arrays
even and odd such that the array even contains all the even numbers and other is odd. So the
output will be—
(e.g. Original array is 7,9,4,6,5,3,2,10,18
Odd array is 7,9,5,3
Even array is 4, 6, 2, 10, and 18)
7)What is meant by sorting? Explain bubble sort with an example.
8) Write a c program to sort the following numbers using bubble sort
12 1 15 3 41 87 7 0
9) List and explain the basic operations performed in stack?
10) List and explain the basic operations performed in Queue?
11) what is an array? Write a c program to store 6 subject marks of a student and perform average of marks
using arrays?
12) Explain the concept of inter function communication using arrays.
13) What is an array? How to declare and initialize arrays? Explain with example
14)How can we declare and initialize 2D arrays? Explain with examples.
15. Explain how two dimensional arrays can be used to represent matrices (or) Define an array and how the
memory is allocated for a 2D array? Write a program to perform matrix addition
16. Define multi dimensional arrays? How to declare multi dimensional arrays?
17) Briefly discuss about types of arrays in C with syntaxes.
18)Explain about searching and sorting techniques. Give example program for any of them
UNIT – III
2-MARKS
1) What are the scope rules?
2) What is the use of type qualifier?
3) List down the limitations of recursion?
4) What is inter function communication and list its types?
5) What is meant by a pointer variable?
6) What are the different memory allocation functions?
7) How to define and initialize a pointer variable?
8) What are user-defined functions?
9) Explain pointer arithmetic?
10) List the advantages of pointers?
11) Differentiate between call by reference and call by value?
12)what is calloc()?
13)What is malloc()?
10- MARKS
1) Explain Inter-Function communication with examples?
2) Define recursion? What are the limitations of recursion?
3) Demonstrate array of pointers with an example?
4) How pointers are useful for inter-function communication?
5) What is pointer to pointer communication? Explain
OR
Explain about the concept of pointers of pointer (or) double pointer?

6) Explain different categories of user defined functions with examples?


OR
How can you categorize functions based on parameters and return types?
7) Write a C Program that use both recursive and non-recursive functions. To find the
factorial of a given number.
8) Explain the Call-by- Value and Call-by- reference with respect to exchange of two
Elements?
OR
Explain with a program the different parameter passing techniques?
9) Explain storage classes in detail.
10) Explain passing an array to a function with example
11) Write a C program to find the GCD of two numbers using recursion
12) What is a function? Explain the different types of parameters in C functions
13) Write a C Program to perform addition of two matrices using functions?
14) What is an array? What are the types of arrays? Explain it with suitable examples?
15) Write a C program that swap two numbers using pointers? (5 MARKS)
16) Explain pointer arithmetic? Discuss with a suitable example how to pass an array to a
function?
17) Define scope? Explain local and global variable with examples?
OR
Write short notes on scope of variables?
18) what are the dynamic memory allocation functions and explain them?
OR
Explain the following dynamic memory allocation functions
a) malloc
b) calloc
c) realloc
19) what are the differences and similarities between malloc and calloc in c?
UNIT – IV
2-MARKS
1)Define string?
2) List any 5 string manipulation functions?
3) Differentiate gets() and getc().
4) List any 2 differences between structure and union.
5) Distinguish strcpy() and strcat() functions?
6) What is self-referential structure?
7) What is bit-field?
8) Define structure with syntax?
9) what is #undef?
10) what is #ifndef?
11) Define a word typedef?
12)what is structure?
13)What is union?
14) What is the difference between scanf() and gets()?
15) ) what is #define?
16)Define string in C? What is the syntax of string?
17) Difference between char array and string literal
18) List out some string i/o functions
19) What is the difference between printf() and puts()?

10-MARKS

1) Explain the concept of array of strings using an example.


2) How many ways a structure can be passed as an argument to functions?
3) Write about Nested structures.
4) What are command line arguments and explain with example?
Or
Explain about command line argument. give an example program how to pass
arguments through command line?
5) What is Pre-processor? Define some Pre-processors in C?.
6)Explain the various String Manipulation functions in C?
7)Differentiate structure and union with example of each.
OR
Compare structure and union (or)Mention differentiation between Union and Structure?
8)Write a C program that demonstrates string I/O functions.
OR
Why we use string i/o functions and what are they?
9)Write a c program to perform whether the given string is in palindrome or not.
Or
Write a C program that uses a non-recursive function to determine if the given string is a palindrome or not.
10)Write a C program that uses functions to perform the following operations:
i) To insert a sub-string in to a given main string from a given position.
ii) To delete n Characters from a given position in a given string.
11) . Describe about how to pass a structure through pointer with example?
12) Explain the following with example
a) pointer to structures b)self referential structure
13) what is self referential structure? How it differ from nested structure. Explain with example?
14) explain briefly preprocessor commands with example
15) Why we use enum and mention the syntaxes?
OR
What are enumeration constants? How do you declare them?
OR
Discuss about enumeration data type?
16)Write a C program to replace a substring with another in a given line of text.

17)Write a C program that reads 15 names each of up to 30 characters, stores them in an array, and uses an
array of pointers to display them in ascending (i.e., alphabetical) order.

18)What is a union? Givethe syntax and example.


UNIT V
2MARKS
1) What are file I/O functions?
2) List the file I/O and positioning functions?
3) Compare text file with binary file.
4) Give the syntax for fseek ( )?
5) What is ferror()?
6) Define feof()
7) Define ftell()
8) what is a text file?
9) what is binary file?
10) Differentiate between fscanf() and fgetc()?
11) Differentiate between fprintf() and fputc()?
12) Differentiate between fgetw() and fgetc()?
10 MARKS
1 ) Write a C program to copy one file content to another file using command line arguments.
2) Write a C program to display the contents of file?
3) Write about file positioning functions.
OR
Write short notes on following file positioning functions
a) fseek()
b) rewind()
c) ftell()
4) Explain file operations? Write a C program to reverse the file content.
5) Explain the concept of file. How to open a file and what are the file operation modes?
6) What are the different modes of file operations? Give their syntaxes?
7) What are the different types of files available in C?
OR
Distinguish between text stream and binary stream operations of a file?
8) Write a short note on following
a) Opening a file
b) Reading or writing a file
c) Closing of a file
9) Discuss about following file input/output functions with examples
a) fscanf()
b) fprintf()
10) Write short notes on following file output functions
a) fputs()
b) fputc()
11) Write short notes on following file input functions
a) fgets()
b) fgetc()

You might also like