Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary C part 3 Structures of C

Rating
-
Sold
-
Pages
24
Uploaded on
28-10-2024
Written in
2024/2025

This document includes information related to Structure of c language.

Institution
Course

Content preview

Chapter No: 2 C Part - II
Introductions to C Language


Question No Question
1 Explain structure of C Program
2 What is Token?
3 Define Term Identifier, Keywords & Constants
Mentioned
4 What is Tri-Graph character?
Topics5 in Explain different data types available in C.
6
Document Define the term precedence and associativity.
7 Explain different operators available in C.
8 Explain implicit type casting & explicit type casting.
9 What is the use of header file?
10 Explain printf() and scanf() function with example.
11 Explain getch(), getche() and getchar() with example.
12 Explain putchar() with example.


1.
Q Explain Structure of C Program.
Answer:
Basic structure of C program:
Documentation Section
Link Section
Definition Section
Global declaration Section
main()
{
Declaration Part;
Executable Part;
}
Subprogram Section
User defined Function
Various sections of C program are as under:-

, Documentation Section It contains set of comment lines giving
(Optional) the details of the program like name of
program, author name and date of
Link Section It contains the list of standard header files
which are needed to execute the program.
For example stdio.h and conio.h
Definition section It defines pre-processor directives
(Optional)
Global section Variables that are common for more than
(Optional) one function are declared in global
main() It is a function that must be present in
every C program. It is the first function
that is called up when the program is
executed. It is used with two curly
brackets to group the statements together
Subprograms The sub program section contains user
(Optional) defined functions.

Example:-
// a program to print hello world (Documentation Section)

#include <stdio.h>
Link Section
#include<conio.h>

void main()
{
Printf(“Hello
main Section
World”);
getch();
}

, 2.
Q What is Token?
Answer:

• The smallest individual unit of C program is known as C tokens.
• The C compiler breaks down the instructions into various components.
• A token is a source program text which compiler does not break into further
elements.
• This basic elements recognized by the compilers are known as “tokens”.
• These elements are further classified into keywords, identifiers, Constants,
Operators, Strings and Special Symbols.

Identifier
For Ex.(Variable name,
function name etc.)



Keywords
For Ex.(int, float,
while, etc.)


Constants
For Ex.(79, 3.14 etc.)
Toke
n
Operators
For Ex.(+, -, *, etc.)


String
For Ex.(“xyz”,
”VVP”, etc. )


Special Symbol
For Ex.(#, $, \, etc.)

Written for

Institution
Secondary school
School year
1

Document information

Uploaded on
October 28, 2024
Number of pages
24
Written in
2024/2025
Type
SUMMARY

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Yourhelper11

Get to know the seller

Seller avatar
Yourhelper11 Private university
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions