All Exams Test series for 1 year @ ₹349 only
Question

Which of the following is not a keyword in 'C'?

The correct answer is

Function

Understanding C Language Keywords

In the C programming language, certain words are reserved and have a special meaning to the compiler. These reserved words are called keywords. They are used to define the structure and behavior of C programs. You cannot use these keywords as identifiers (like variable names or function names) because they already have a predefined purpose.

The question asks us to identify which word among the given options is not a keyword in C.

Analyzing the Options for C Keywords

Let's examine each option to determine if it is a standard C keyword:

  1. Function: In C programming, we define and use functions, which are blocks of code that perform a specific task. However, the word "Function" itself is not a reserved keyword in the C language. Keywords are typically single words like int, void, if, while, etc.
  2. Volatile: The word volatile is a keyword in C. It is used as a type qualifier, suggesting that a variable's value may be changed by something outside the normal flow of the program (like an interrupt service routine or another thread). This tells the compiler not to optimize accesses to this variable.
  3. Goto: The word goto is a keyword in C. It is used to transfer program control unconditionally to a labeled statement within the same function. While it is a keyword, its use is generally discouraged in modern programming practices as it can make code harder to understand and maintain.
  4. Auto: The word auto is a keyword in C. It is a storage class specifier. It is used to declare local variables, meaning they are automatically created when the block they are in is entered and destroyed when the block is exited. For local variables, auto is the default storage class, so its explicit use is often redundant.

Identifying the Non-Keyword in C

Based on the analysis of each option, we can conclude that volatile, goto, and auto are all reserved keywords in the standard C language. The word "Function" is used to describe a programming concept but is not a reserved keyword itself.

Therefore, the word that is not a keyword in 'C' is "Function".

Keywords vs. Non-Keywords in C Options
Word Is it a C Keyword?
Function No
Volatile Yes
Goto Yes
Auto Yes

Revision Table: Essential C Keywords

Common C Keywords Quick Reference
Category Examples of Keywords
Data Types int, char, float, double, void
Control Flow if, else, switch, case, default, for, while, do, break, continue, goto
Storage Classes auto, register, static, extern
Qualifiers const, volatile, restrict
Other sizeof, typedef, struct, union, enum, return, signed, unsigned, long, short

Additional Information: Why Knowing C Keywords is Important

Understanding C keywords is fundamental when learning C programming. Keywords are the building blocks of the language's syntax. Misusing a keyword (e.g., trying to use `int` as a variable name) will result in compilation errors.

Each keyword has a specific role defined by the C standard. For instance:

  • int is used to declare variables that store integer values.
  • if is used to create conditional branches in your code.
  • for and while are used to create loops.
  • return is used to exit a function and optionally return a value.

While the list of keywords is fixed, their correct usage allows programmers to write various types of programs, from simple scripts to complex operating systems.

Was this answer helpful?

Important Questions from Programming in C

  1. Which among the following is a valid string function?

  2. A function which calls itself is called a

  3. Which of the following function sets first n characters of a string to a given character?

  4. Which of the following statement provides an easy way to dispatch execution to different parts of code based on the value of the expression?

  5. Which of the following operators has left to right associativity?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App