Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions

Important Questions Class 11

Please refer to Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions with solutions provided below. These questions and answers have been provided for Class 11 Computer science based on the latest syllabus and examination guidelines issued by CBSE, NCERT, and KVS. Students should learn these problem solutions as it will help them to gain more marks in examinations. We have provided Important Questions for Class 11 Computer Science for all chapters in your book. These Board exam questions have been designed by expert teachers of Standard 11.

Class 11 Computer Science Important Questions Introduction to C and Basic Structure of C Program

Short Answer Type Questions:

Question: Why C is called Middle Level Programming Language?
Ans: C has the functionality of both types of programming languages, i.e. low-level and high-level programming languages. It means C language is suitable for writing both types of programs – system programs and application programs. Thus C-Language became a programming language that stood between both low-level and high-level programming languages. That is why C language is called middle level language. However, the middle level language is not a special category of programming languages. Because of the special capabilities of the C language, it is known as a middle level programming language. 

Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions

Question: What are keywords?
Ans: Keywords are also called Reserve Words. These words are predefined in C compiler. The meaning of these words is predefined. They are used for the specific purpose for which they were defined. We cannot change their meaning. In Turbo C these words are shown in white color while in Code::Blocks these words are shown in blue color. The standard C language has 32 keywords. For example: int, float, void, if, else, for, while etc. In C programming, all keywords are written in lowercase letters only.

Question: What are Pre-processor directives?
Ans: Pre-processor instructions are those statements that begin with the # symbol. These statements give instructions to the compiler to perform some specific operations before compilation. These directive statements are commonly used to include header files in the program or to define symbolic constants. Here are some examples of commonly used pre-processors: 
#include <stdio.h>
#define PI 3.14

Question: What should be the steps for creating and executing C program?
Ans: The following steps can be used to create a C language program:
1. Develop a program algorithm.
2. Create a C program as per the algorithm using any text editor or IDE that supports C language.
3. Save the file by writing a file name with .c extension.
4. Compile the program.
5. If the program has a syntax error, correct it and repeat step 4.
6. Execute the program.
7. Output of program will appear in the output window.

Question: What is a character set?
Ans: The set of all characters and symbols used in the C language is called the character set of C language. The C language supports the ASCII character set. The following characters and symbols can be used in C language:
• Upper-case and Lower-case Alphabets (A to Z, a to z)
• Digits (0 to 9)
• Special Symbols, For Example: ! @ # $ % ^ . ? / | \ etc.
• Some Non-printable characters, For example: new-line, horizontal-tab etc.

Question: Write the difference between variables and constants.
Ans: Both of these are important program elements that are used to store a value in a program. Both elements are given a name in the program and the type of value to be stored in them. But there is a slight difference between the two. Variables allow us to change their values while running a program whereas constants do not allow it. It means constant values are fixed while variable values are changeable.

Long Answer Type Questions:

Question: What are Tokens? What are the different categories of tokens that can be used in a program?
Ans: Tokens are like words and punctuation marks used in English. A C program is made up of tokens. Tokens are the smallest individual units in a program. A C program can have the following five types of tokens:

Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions

1. Keywords: These are predefined words. For example: int, float, char, if, else, void etc.
2. Identifier: These are the names given to program elements. For example: main, printf, etc.
3. Literals: These are fixed values. For example: 5, -25, 3.14, ‘A’ “Hello” etc.
4. Operators: These are the symbols for specific operations. For example: +, -, *, /,>, <, = etc.
5. Special symbols: These are the special symbols. For example: #, &, { }, ( ), [ ], :, ; etc.

Question: What are the data types? Which primitive data types are supported by C language?
Ans: Data type defines what type of data is to be stored in program elements, such as variables, constants, arrays, etc. They define a specific range of values for variables or other program elements. The C language supports a variety of data types. The following table shows the different basic data types available in the standard C language:

Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions

Question: What are Identifiers? Write the naming rules of identifiers.
Ans: Identifiers are the names given to program elements, such as variables, constants, arrays, functions, structures, etc. Some rules are followed in C programs to define the names of program elements. These rules are as follows:
• The identifier must start with a letter or underscore (_) sign.
• No special symbols, except underscore (_), are allowed in the identifier.
• Two consecutive underscores cannot be used in the identifier.
• In Turbo C compiler, the length of the identifier is limited to 31 characters.
• Keywords cannot be used as identifier.
• Identifier are case-sensitive.
• No spaces are allowed in the identifier.

Question: Explain the formatted input and output statements used in the C programs.
Ans: Input and output statements provide interaction between users and programs. The user provides input to the program using the input statement and the program gives the output to the user using the output statement. C programs usually use the scanf () and printf () functions for formatted input/output operations. These functions are part of the stdio.h header file. That’s why the header file stdio.h is included in every C program. The following figure illustrates the purpose of input and output statements in C programs:

Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions

Input function scanf (): In the C program, the scanf () function is used to receive data from a standard input device (i.e. keyboard). This function can be used to input any number,  single character or string values. For example:
scanf (“%d %f”, &a, &b);
Output function printf (): In the C program, the printf () function is used to represent any information or value on the monitor (output) screen. for example:
printf (“Hello from C Language”);
printf (“%d %f”, a, b);

Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions
Introduction to C and Basic Structure of C Program Class 11 Computer Science Important Questions