0% found this document useful (0 votes)
74 views4 pages

C-VIVA Questions

This document contains 50 questions related to fundamental C programming concepts including: - Data types, variables, constants, and operators - Input/output functions, expressions, and assignment statements - Decision-making and looping statements - Arrays, strings, functions, pointers, structures, and files - Dynamic memory allocation, command line arguments, and more It serves as a review of core C programming topics for an exam.

Uploaded by

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

C-VIVA Questions

This document contains 50 questions related to fundamental C programming concepts including: - Data types, variables, constants, and operators - Input/output functions, expressions, and assignment statements - Decision-making and looping statements - Arrays, strings, functions, pointers, structures, and files - Dynamic memory allocation, command line arguments, and more It serves as a review of core C programming topics for an exam.

Uploaded by

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

CSA0213-C Programming for Internet protection

VIVA Questions

1. What are the fundamental data types in C?


2. What are constants in C programming, and how are they different from
variables?
3. What are keywords in C, and why are they important?
4. Explain the concept of operators in C. What is their precedence and
associativity?
5. How do you define an expression in C? Provide an example.
6. What are the standard input and output functions in C, and how are they
used?
7. How do you assign values to variables in C? Give an example of an
assignment statement.
8. What are decision-making statements in C? Name some of them.
9. Explain the "if" statement in C and provide an example.
10.What is a switch statement in C, and how does it differ from "if-else"
statements?
11.What is the purpose of looping statements in C? Give examples of
different loop types.
12.What are preprocessor directives in C, and why are they used?
13.What is the difference between global and local variables in C?
14.What is an array in programming, and why are they used?
15.How do you declare an array in C? Provide an example.
16.Explain the process of initializing a one-dimensional array. Give an
example.
17.Can you write a C program to compute the mean, median, and mode of a
set of numbers using a one-dimensional array?
18.What is a two-dimensional array, and how is it different from a one-
dimensional array?
19.Provide an example C program that performs matrix addition using two-
dimensional arrays.
20.How do you find the determinant of a matrix using a C program and two-
dimensional arrays?
21.Explain the concept of string operations in C. Mention some common
string functions.
22.Write a C program to concatenate two strings without using any built-in
functions.
23.What is a function in programming, and why are functions important in
C?
24.Explain the components of a function, including function prototype,
definition, and call.
25.Can you provide an example of declaring a function prototype in C?
26.Describe the difference between built-in functions and user-defined
functions in C.
27.Name some commonly used built-in string functions in C.
28.How do you define a function in C? Provide an example of a user-defined
function.
29.What is recursion, and how does it work in C? Provide an example of a
recursive function.
30.Write a C program to compute the sine series using a recursive function.
31.How can you create a scientific calculator using built-in math functions in
C?
32.What are pointers in C, and how are they used?
33.Explain the pointer operators in C, such as the '*' and '&' operators.
34.What is pointer arithmetic, and when is it used in C programming?
35.Describe the relationship between arrays and pointers in C. Give an
example.
36.What is an array of pointers, and how can it be used in sorting names in
C?
37.Compare "pass by value" and "pass by reference" parameter passing
methods in C. Provide an example of each.
38.What is a structure in C, and why is it used?
39.How can you declare and define a structure in C?
40.Explain the concept of nested structures. Provide an example.
41.What are pointers to structures, and how are they used in C
programming?
42.Describe the concept of an array of structures. Give a practical example.
43.Can you provide an example program that uses structures and pointers
together?
44.What are self-referential structures, and how do they relate to linked lists
in C?
45.What is dynamic memory allocation, and why is it essential in
programming?
46.What is the role of files in C programming, and why are they important?
47.Explain the two types of file processing: sequential access and random
access.
48.Describe the process of reading and writing data in a sequential access
file. Provide an example program.
49.How does random access differ from sequential access in terms of file
handling? Can you give an example of using random access files?
50.What are command-line arguments, and how are they used in C
programs? Give an example of a C program that utilizes command-line
arguments.

You might also like