Viva Question
Viva Question
6. What are identifiers? What rules should you follow when naming them?
Identifiers are names used to represent variables, functions, arrays, etc. Rules for
naming:
Start with a letter or underscore.
Contain only letters, digits, or underscores.
Cannot be a keyword.
30.What is a function in C?
A function is a block of code that performs a specific task. It can take input
(parameters) and return a result (return value).
User-defined Functions:
These are functions defined by the programmer to perform specific tasks in
the program.
A user-defined function can either return a value or not and can accept
parameters or not.
Parameter:
1. Actual Parameters:
These are the values or variables passed to the function when it is called.
2. Formal Parameters:
These are the variables declared in the function definition that receive the
values passed from the actual parameters.
44.What is a string in C?
A string in C is an array of characters terminated by a null character ('\0').
46.What is a structure in C?
A structure is a user-defined data type that can store multiple variables of different
data types.
Pointer declaration specifies the type of variable the pointer will point to. It
tells the compiler what type of data the pointer will hold the address of.
Pointer calling refers to using the pointer to access or manipulate the value
stored at the memory address it points to. This is typically done using the
dereference operator (*).