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

Scenario of Symbol Table Code in C Language

The code defines main() to add, subtract, and multiply two numbers entered by the user. It includes header files, declares variables to store the numbers and results, uses printf() and scanf() to output prompts and results and read input, performs the calculations, and returns 0 at the end. The symbol table lists each line of code, identifying keywords, variables, operators, and other elements for reference.

Uploaded by

Khushi Sid
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views4 pages

Scenario of Symbol Table Code in C Language

The code defines main() to add, subtract, and multiply two numbers entered by the user. It includes header files, declares variables to store the numbers and results, uses printf() and scanf() to output prompts and results and read input, performs the calculations, and returns 0 at the end. The symbol table lists each line of code, identifying keywords, variables, operators, and other elements for reference.

Uploaded by

Khushi Sid
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

SCENARIO OF SYMBOL TABLE

Code in C language
1. #include<stdio.h>
2. #include<conio.h>
3.
4. int main()
5. {
6.
int a, b, c, d, e;
7.
8.
printf("Enter two numbers to add\n");
9.
scanf("%d%d",&a,&b);
10.
c = a + b;
11.
12.
printf("Sum of entered numbers = %d\n",c);
13.
d=a-b;
14.
printf("Difference of entered numbers = %d\n",d);
15.
e=a*b;
16.
printf("Multiplication of entered numbers = %d\n",e);
17.
18.
return 0;
19. }

Symbol table for code


Line
No.

Data Keyword Variable Brackets Operator Numeric Header


Type
Name
Value
File

1.

#include

<>

Stdio.h

2.

#include

<>

Conio.h

Function/ Formatting
Escape
method
command character

Semicolon

3.
4.

int

()

5.
6.

main

{
int

a,b,c,d,e

7.
8.

printf

()

\n

9.

scanf

10.

()
c,a,b

&&

%d,%d

= +

11.
12.

printf

13.
14.

()

d,a,b
printf

15.
16.

%d

\n

-=
()

e,a,b
printf

%d

\n

* =
()

;
;

%d

\n

17.
18.

return

19.

You might also like