Tuesday 29 June 2010

Interview Questions on Data Types and Variables

Which of the following is not a valid variable name declaration?
a) int int;
b) int 3a;
c) int goto;
d) None of the mentioned

Answer:d

Variable names beginning with underscore is not encouraged. Why?
a) It is not standardized
b) To avoid conflicts since assemblers and loaders use such names
c) To avoid conflicts since library routines use such names
d) To avoid conflicts with environment variables of an operating system

Answer:c

All keywords in C are in
a) LowerCase letters
b) UpperCase letters
c) CamelCase letters
d) None
Answer:a
Click on to read more on Keywords

Which of the following is not a valid C variable name?
a) int number;
b) float rate;
c) int variable_count;
d) int $main;
Answer:d
Explanation: Since only underscore and no other special character is allowed in a variable name, it results in an error.

Which of the following is true for variable names in C?
a) They can contain alphanumeric characters as well as special characters
b) It is not an error to declare a variable to be one of the keywords(like goto, static)
c) Variable names cannot start with a digit
d) Variable can be of any length
Answer:c
Explanation: According to the syntax for C variable name, it cannot start with a digit.

Which is valid C expression?
a) int n = 100,000;
b) int n = 100000;
c) int my num = 1000;
d) int $n = 10000;
Answer:b
Explanation: space, comma and $ cannot be used in a variable name.

What is the output of this C code?
    #include <stdio.h>
    void main()
    {
        printf("Rajendra %d \n", x);
       
    }
    a) Rajendra x;
    b) Rajendra followed by a Garbage value
    c) Compile time error
    d) Rajendra
Answer:c

Which of the following is not a valid variable name declaration?
a) float PI = 3.14;
b) double PI = 3.14;
c) int PI = 3.14;
d) #define PI 3.14

Answer:d
Explanation: since it is a Macro definition ( Macros )


What will happen if the below program is executed?
    #include <stdio.h>
    void main()
    {
        int main = 3;
        printf("%d", main);
    
    }
a) It will cause a compile-time error
b) It will cause a run-time error
c) It will run without any error and prints 3
d) It will experience infinite looping

Answer:c
Explanation: A C program can have same function name and same variable name.

10. What is the problem in following variable declaration?
float 7Apssdc-TCS-Training?;
a) The variable name begins with an integer
b) The special character ‘-‘
c) The special character ‘?’
d) All of the mentioned

Answer: d

What is the Output of this C code?
    #include <stdio.h>
    int main()
    {
        int ThisIsVariableName = 12;
        int ThisIsVariablename = 14;
        printf("%d", ThisIsVariablename);
        return 0;
    }

a) The program will print 12
b) The program will print 14
c) The program will have a runtime error
d) The program will cause a compile-time error due to redeclaration

Answer:b

A Variable is a....?
A. indicated datatype
B. stores the data
C. Collection of elements
D. None
Answer: Option B

The format identifier ‘%i’ is also used for _____ data type?
a) char
b) int
c) float
d) double

Answer:b
Explanation: Both %d and %i can be used as a format identifier for int data type.

Which of the following is a User-defined data type?
a) int;
b) strings
c) enum
d) all of the mentioned
Answer:c

What is short int in C programming?
a) Basic datatype of C
b) Qualifier
c) short is the qualifier and int is the basic datatype
d) All of the mentioned
Answer:c

Which is correct with respect to size of the datatypes?
a) char > int > float
b) int > char > float
c) char < int < double
d) double > char > int
Answer:c
Explanation:char has lesser bytes than int and int has lesser bytes than double in any system

What is the output of this C code?
    #include <stdio.h>
    int main()
    {
        float x = 'a';
        printf("%f", x);
        return 0;
    }
a) a
b) run time error
c) a.0000000
d) 97.000000
Answer:d
Explanation:Since the ASCII value of a is 97, the same is assigned to the float variable and printed.

What is the output of this C code?
#include<stdio.h>
main()
{
   int x = 5;
  
   if(x=5)
   {
      if(x=5) printf("Ram");
   }
   printf("Sitha");
}
a) RamSitha
b) Ram
c) Sitha
d) Error

Answer:A
Explanation:RamSitha, both the if statement’s expression evaluates to be true.

What is the output of this C code?
    #include <stdio.h>
    int main()
    {
        int var = 010;
        printf("%d", var);
    }
a) 2
b) 8
c) 9
d) 10

Answer:b
Explanation:010 is octal representation of 8.

Can I use  int data type to store the value 32768? Why?
No. int data type is capable of storing values from -32768 to 32767. To store 32768, you can use long int instead. You can also use unsigned int, assuming you dont intend to store negative values. 


Back  
You may like the following posts:
Identifiers
C Tokens
      Data type
      Variables
      Constants

Interview Questions on Functions



#include<stdio.h>
void swap(int m, int n)
{
   int x = m;
  
   m = n;
   n = x;
}
main()
{
   int x=2, y=3;
   swap(x,y);
   printf("%d %d", x, y);
}
A. 2 3
B. 3 2
c. 2 2
D. Error

Answer:a


When is the void keyword used in a function?
When declaring functions, you will decide whether that function would be returning a value or not. If that function will not return a value, such as when the purpose of a function is to display some outputs on the screen, then “void” is to be placed at the leftmost part of the function header. When a return value is expected after the function execution, the data type of the return value is placed instead of “void”. 


Back
You may like the following posts:
Functions

Monday 28 June 2010

Interview questions on 1 D Arrays

What is right way to Initialize array?
A. int num[6] = { 2, 4, 12, 5, 45, 5 };
B. int n{} = { 2, 4, 12, 5, 45, 5 };
C. int n{6} = { 2, 4, 12 };
D. int n(6) = { 2, 4, 12, 5, 45, 5 };
Answer & Solution
Option A

What will be the output of the program ?
#include<stdio.h>
void main()
{
    int a[5] = {5, 1, 15, 20, 25};
    int i, j, m;
    i = ++a[1];
    j = a[1]++;
    m = a[i++];
    printf("%d, %d, %d", i, j, m);
}
A. 3, 2, 15
B. 2, 3, 20
C. 2, 1, 15
D. 1, 2, 5
Answer: Option A

What will be the output of following program code?
#include <stdio.h>
int main(void)
{
    char p;
    char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8};
    p = (buf + 1)[5];
    printf("%d", p);
    return 0;
}
A. 5
B. 6
C. 9
D. Error
E. None of the above

Answer: Option C

An array elements are always stored in ________ memory locations.
A. Sequential
B. Random
C. Sequential and Random
D. None of the above
Option A

What is the maximum number of dimensions an array in C may have?
A. 2
B. 8
C. 20
D. 50
E. Theoratically no limit. The only practical limits are memory size and compilers.
Ans: Option E

Size of the array need not be specified, when
A. Initialization is a part of definition
B. It is a declaratrion
C. It is a formal parameter
D. All of these
Option D

What will be printed after execution of the following code?
void main()
{
      int arr[10] = {1,2,3,4,5};
      printf("%d", arr[5]);
}
A. Garbage Value
B. 5
C. 6
D. 0
E. None of these
Answer & Solution
 Option D

What will be the output of the following program?
void main()
{
      char str1[] = "abcd";
      char str2[] = "abcd";
      if(str1==str2)
            printf("Equal");
      else
            printf("Unequal");
}
A. Equal
B. Unequal
C. Error
D. None of these.
Ans: B

What will be the output of the following code?
void main()
{
      int a[10];
      printf("%d %d", a[-1], a[12]);
}
A. 0 0
B. Garbage value 0
C. 0 Garbage Value
D. Garbage vlaue Garbage Value
E. Code will not compile
 Option D

What will be the output of the program ?
#include
int main()
{
    int arr[1] = {10};
    printf("%d", 0[arr]);
    return 0;
}
A. 1
B. 0
C. 10
D. 6
E. None of these
Option C

Which of the following statements are correct about the program below?
#include<stdio.h>
void main()
{
    int size, i;
    scanf("%d", &size);
    int arr[size];
    for(i=1; i<=size; i++)
    {
        scanf("%d", arr[i]);
        printf("%d", arr[i]);
    }
}
A. The code is erroneous since the statement declaring array is invalid.
B. The code is erroneous since the subscript for array used in for loop is in the range 1 to size.
C. The code is correct and runs successfully.
D. The code is erroneous since the values of array are getting scanned through the loop.
E. None of these
Answer & Solution
Option A

Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
A 1
B.1, 4
C.2, 3
D. 2, 4
E.None of these
Answer & Solution
Option B

How would you use qsort() function to sort the name stored in an array of pointers to string?   
Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted array name?             
What is the difference between null array and an empty array?
How to remove duplicate elements from an array           
Can the sizeof operator be used to tell the size of an array passed to a function?              
Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted array name?             
WAP to store elements of last col in 1st col and so on.   
When does the compiler not implicitly generate the address of the first element of an array?    
Write a program to delete an element from an array?   
Can the sizeof operator be used to tell the size of an array passed to a function?              
Code for swapping of two numbers without using temporary variable using C.  
Write a program to insert an element in a linear array array?      
how to print 2 dimensional array in descending order?  
Can the size of an array be declared at runtime?              
Array is an lvalue or not?             
Write a program using an array that computes the sum and the average of nth input values from the keyboard and prints the calculated sum and average. 
what will happen if we try to store more number of elements than specified in array size?          
Does mentioning the array name gives the base address in all the integers?       
Can we add the name as "Mixed Arrays" instead of the name given as "Structures" in c?why the name structure is given?  
Write a program for n lines 1 2 3 4 5 16 17 18 19 6 15 24 25 30 7 14 23 22 21 8 13 12 11 10 9
Back

You may like the following posts:

Interview Questions on for loops

The following code ‘for(;;)’ represents an infinite loop. It can be terminated by.
a) break
b) exit(0)
c) abort()
d) All of the mentioned

Answer:a
The correct syntax for running two variable for loop simultaneously is.
a) for (i = 0; i < n; i++)    
   for (j = 0; j < n; j += 5)
b) for (i = 0, j = 0;i < n, j < n; i++, j += 5)
c) for (i = 0; i < n;i++){}  
   for (j = 0; j < n;j += 5){}
d) None of the mentioned

Answer:b

Which for loop has range of similar indexes of 'i' used in for (i = 0;i < n; i++)?
a) for (i = n; i>0; i–)
b) for (i = n; i >= 0; i–)
c) for (i = n-1; i>0; i–)
d) for (i = n-1; i>-1; i–)

Answer:d
Which of the following cannot be used as LHS of the expression in for (exp1;exp2; exp3) ?
a) Variable
b) Function
c) typedef
d) macros

Answer:d
What is the output of this C code?

    #include <stdio.h>
    int main()
    {
        short i;
        for (i = 1; i >= 0; i++)
            printf("%d\n", i);

    }


a) The control won’t fall into the for loop
b) Numbers will be displayed until the signed limit of short and throw a runtime error
c) Numbers will be displayed until the signed limit of short and program will successfully     terminate
d) This program will get into an infinite loop and keep printing numbers with no errors

Answer:c

What is the output of this C code?

    #include <stdio.h>
    void main()
    {
        int k = 0;
        for (k)
            printf("Hello");
    }
a) Compile time error
b) hello
c) Nothing
d) Varies

Answer:a
What is the output of this C code?

    #include <stdio.h>
    void main()
    {
        int k = 0;
        for (k < 3; k++)
        printf("Hello");
    }
a) Compile time error
b) Hello is printed thrice
c) Nothing
d) Varies

Answer:a

What is the output of this C code?
    #include <stdio.h>
    void main()
    {
        double k = 0;
        for (k = 0.0; k < 3.0; k++)
            printf("Hello");
    }
a) Run time error
b) Hello is printed thrice
c) Hello is printed twice
d) Hello is printed infinitely

Answer:b


What is the output of this C code?
    #include <stdio.h>
    int main()
    {
        int i = 0;
        for (; ; ;)
            printf("In for loop\n");
            printf("After loop\n");
    }

a) Compile time error
b) Infinite loop
c) After loop
d) Undefined behaviour

Answer:a

What is the output of this C code?
    #include <stdio.h>
    int main()
    {
        int i = 0;
        for (i++; i == 1; i = 2)
            printf("In for loop ");
            printf("After loop\n");
    }
a) In for loop after loop
b) After loop
c) Compile time error
d) Undefined behaviour

Ans: a

Back to Interview Questions on Loops
Back   Next

You may like the following posts:
Loops
Interview Questions on while loop

Interview Questions on Switch Statements

Comment on the output of this C code?
    #include <stdio.h>
    int main()
    {
        int a = 1;
        switch (a)
        case 1:
            printf("%d", a);
        case 2:
            printf("%d", a);
        case 3:
            printf("%d", a);
        default:
            printf("%d", a);
    }
a) No error, output is 1111
b) No error, output is 1
c) Compile time error, no break statements
d) Compile time error, case label outside switch statement

Answer:d

Switch statement accepts.
a) int
b) char
c) long
d) All of the mentioned

Answer:d

Comment on the output of this C code?
    #include <stdio.h>
    switch (ch)
    {
    case 'a':
    case 'A':
        printf("true");
    }
a) if (ch == ‘a’ && ch == ‘A’) printf(“true”);
b) if (ch == ‘a’)
    if (ch == ‘a’) printf(“true”);
c) if (ch == ‘a’ || ch == ‘A’) printf(“true”);
d) Both a and b

Answer:c

What is the output

    #include <stdio.h>
    void main()
    {
        double ch=1;
        switch (ch)
        {
        case 1:
            printf("1");
            break;
        case 2:
            printf("2");
            break;
        }
    }
a) Compile time error
b) 1
c) 2
d) Varies

Answer:a

What is the output

    #include <stdio.h>
    void main()
    {
        char *p;
        p=1;
        switch (p)
        {
        case "1":
            printf("1");
            break;
        case "2":
            printf("2");
            break;
        }
    }
a) 1
b) 2
c) Compile time error
d) No Compile time error

Answer:c

What is the output

    #include <stdio.h>
    void main()
    {
        int ch=1;
        switch (ch)
        {
        case 1:
            printf("1\n");
        default:
            printf("2\n");
        }
    }

a) 1
b) 2
c) 1 2
d) Run time error

Answer:c

What is the output

    #include <stdio.h>
    void main()
    {
        int ch=2;
        switch (ch)
        {
        case 1:
            printf("1\n");
            break;
            printf("Hi");
        default:
            printf("2\n");
        }
    }
a) 1
b) Hi 2
c) Run time error
d) 2

Answer:d

What is the output

    #include <stdio.h>
    void main()
    {
        int ch=1;
        switch (ch, ch + 1)
        {
        case 1:
            printf("1\n");
            break;
        case 2:
            printf("2");
            break;
        }
    }
a) 1
b) 2
c) 3
d) Run time error

Answer:b


Back   Next


You may like the following posts:
switch statement



Two Dimensional Array (2 D)

Definition
Which contain rows and columns (tabular form or matrix form)

Syntax:
DataType Identifier[RowSize][ColumSize];

Example:
int table[5][4];
Initializing:
int a[3][4] = { 
   {0, 1, 2, 3} ,   /*  initializers for row indexed by 0 */
   {4, 5, 6, 7} ,   /*  initializers for row indexed by 1 */
   {8, 9, 10, 11}   /*  initializers for row indexed by 2 */

Accessing
Displaying
Example Program



1) wap to read an 2d array and display */
#include<conio.h>
#include<stdio.h>
void main()
{
 int a[2][3];
/*int a[3][4] = { 
   {0, 1, 2, 3} ,   /*  initializers for row indexed by 0 */
   {4, 5, 6, 7} ,   /*  initializers for row indexed by 1 */
   {8, 9, 10, 11}   /*  initializers for row indexed by 2 */
};
*/
 int i,j;
 printf("enter the elements in 2d array\n");
 for(i=0;i<=2-1;i++)
 {
  for(j=0;j<=3-1;j++)
  {
   scanf("%d",&a[i][j]);
  }
 }
 printf("2d array is\n");
 for(i=0;i<=2-1;i++)
 {
  for(j=0;j<=3-1;j++)
  {
   printf("%d\t",a[i][j]);
  }
  printf("\n");
 }
 getch();
}

// 2 D Initialization
#include<conio.h>
#include<stdio.h>
void main()
{
 int a[2][3];
int a[3][4] = { 
   {0, 1, 2, 3} ,   /*  initializers for row indexed by 0 */
   {4, 5, 6, 7} ,   /*  initializers for row indexed by 1 */
   {8, 9, 10, 11}   /*  initializers for row indexed by 2 */
};

 int i,j;
 printf("2d array is\n");
 for(i=0;i<=2-1;i++)
 {
  for(j=0;j<=3-1;j++)
  {
   printf("%d\t",a[i][j]);
  }
  printf("\n");
 }
 getch();
}

Sunday 27 June 2010

Write a program find largest of 3 no's using else– if statement

//Write a program find largest of 3 no's using else– if .
#include < stdio.h >
#include < conio.h >
void main()
{
 int a, b, c;
 clrscr();
 printf(“enter the values\ n”);
 scanf(“ %d %d %d”, & a, & b, & c);
 if (a = = b && b = = c)
 {
  printf(“values are equal”);
 }
 else if (a > b && a > c)
 {
  printf(“a is big\ n”);
 }
 else if (b > c)
 {
  printf(b is big\ n);
 }
 else
 {
  printf(“c is big\ n);
 }
 getch();
}


You may like the following posts:
1. if statement
2. if..else statement
3. Nested if...else statement (if...else if....else Statement)
4. switch statement
example programs on if..else

Saturday 26 June 2010

simple program on while loop

#include <stdio.h>

void main () {
   /* local variable definition */
   int a = 3;
   /* while loop execution */
   while( a < 5 ) {
      printf("value of a: %d\n", a);
      a++;
   }

}

You may like the following posts:

looping statements or repetative statements

   for loop
   while loop
   do-while

Simple program on for loop


//Simple program on for loop

#include<stdio.h>
#include<conio.h>
void main()
{
 int I;
for(I=1;i<=10;i++)
 printf("%d\n",i);
getch();
}

/*
output:
1
2
3
4
5
6
7
8
9
10
*/
You may like the following posts:

looping statements or repetative statements

   for loop
   while loop
   do-while

C Introduction

Preprocessor Directives

Definition:
Compiler and a linker interact to give the executable file. Actually, before compiling, a process called 'preprocessing' is done on the source code(ie xx.c) by a program called the 'Pre-processor'.

Example: #include<stdio.h>//this line is known as preprocessor directive


Directive   Description
#define      Substitutes a preprocessor macro.
#include     Inserts a particular header from another file.
#undef       Undefines a preprocessor macro.
#if              Tests if a compile time condition is true.
#else          The alternative for #if.
#elif
#else
and
#if                in one statement.
#endif          Ends preprocessor conditional.
#ifdef           Returns true if this macro is defined.
#ifndef         Returns true if this macro is not defined.
#error           Prints error message on stderr.
#pragma       Issues special commands to the compiler, using a standardized method.



Friday 25 June 2010

Wap to read an 2d array and display

//wap to read an 2d array and display */
#include<conio.h>
#include<stdio.h>
void main()
{
 int a[2][3];
 int i,j;
 printf("enter the elements in 2d array\n");
 for(i=0;i<=2-1;i++)
 {
  for(j=0;j<=3-1;j++)
  {
   scanf("%d",&a[i][j]);
  }
 }
 printf("2d array is\n");
 for(i=0;i<=2-1;i++)
 {
  for(j=0;j<=3-1;j++)
  {
   printf("%d\t",a[i][j]);
  }
  printf("\n");
 }
 getch();
}
You may like the following posts:
Arrays

Program on 1- D array Initialisation

//1- D array Initialisation

#include<stdio.h>
#include<conio.h>
void main()
{
 int i;
 int a[]={1,2,3,4,5};
 clrscr();

 printf("array is\n");
 for(i=0;i<5;i++)
 printf("%d\n",a[i]);
 getch();
}
You may like the following posts:
Arrays

1D Array: Example program on array

// Simple program on 1-D array

#include<stdio.h>
#include<conio.h>
void main()
{
 int a[5],i;
 clrscr();
 printf("enter the values into array\n");
 for(i=0;i<5;i++)
  scanf("%d",&a[i]);
 printf("array is\n");
 for(i=0;i<5;i++)
 printf("%d\n",a[i]);
 getch();
}

/*
Enter the values into array
I/p:

2
3
4
5
6

Result
Array is
2
3
4
5
6

*/

You may like the following posts:
Arrays

else if: Simple example program on

#include <stdio.h>


#include<stdio.h>
#include<conio.h>
void main ()
{
   /* local variable definition */
   int a ;

   /* check the boolean condition */
   if( a == 10 ) {
      /* if condition is true then print the following */
      printf("Value of a is 10\n" );
   }
   else if( a == 20 ) {
      /* if else if condition is true */
      printf("Value of a is 20\n" );
   }
   else if( a == 30 ) {
      /* if else if condition is true  */
      printf("Value of a is 30\n" );
   }
   else {
      /* if none of the conditions is true */
      printf("None of the values is matching\n" );
   }
  
   printf("Exact value of a is: %d\n", a );

getch();
}

You may like the following posts:
Conditional statements
     if statement
      if..else statement
      if...else if....else Statement
      switch statement

Thursday 24 June 2010

Expression

An expression is a sequence of operands and operators that reduces to a single value.

Types:

Primary Expressions
Postfix Expressions
Prefix Expressions
Unary Expressions
Binary Expressions






Primary Expressions
Consists of only one operand & no operator.
Types:
Identifiers
Literal Constants
Parenthetical Expressions
Precedence Order: 16 (highest)
Associativity: None

Postfix Expressions
Consist of one operator followed by an operand.
Types:
Function Call
Postfix Increment/Decrement
Precedence Order: 16 (highest)
Associativity: Left-Right

Postfix Increment/Decrement
The postfix increment/decrement operator increase/decrease a variable’s value by 1.
The program reads the value of the variable before the increment/decrement happens.
Result is the same as a = a + 1;
Operand must be a variable!
Postfix increments/decrements have side effects.







Prefix Expressions

Consist of one operator preceded by an operand.
Only one type – prefix increment/decrement.
Precedence Order: 15
Associativity: Right-Left


Unary Expressions

Similar to prefix expressions – consist of one operator preceded by an operand.
Unlike prefix expressions, operand may be variable or expression.
Types:
sizeof
Uninary Plus/Minus
Cast Operator
Associativity: Right-Left


Wednesday 23 June 2010

Format Specifiers

Format Specifiers in C language tells us which type of data to store and which type of data to print.This statement tells us that it is used in only 2 places

It performs following tasks

(1) Taking Input
(2)Displaying Output

Here is an example

int a=2;
 printf( ” %d “, x );

Output

2

Function printf of c language does not know what it has to print either it is and integer or float or long variable. What %d does is that it tells the function printf that it is an integer type variable.And a in function printf tells it to print the integer value from the variable named ‘a’.

Where % indicates conversion specification.


Format specifier         
            Characters matched
Argument type

%c      

any single character
            Char
%d, %i           
Integer
            integer type

%u      

Integer
            unsigned
%o      

octal integer
            unsigned
%x, %X          

hex integer
            unsigned
%e, %E, %f, %g, %G

floating point number
            floating type
%p      

address format
            void *
%s      
any sequence of non-whitespace characters
            char


You may like the following posts:


C tokens example program

//C tokens example program:

void main()
{
 int a, b, c;
 a = 2, b = 3;
 c = a + b;
 printf(“Addition of two no's = %d \n”, c);
 getch()
}                                                                                                                                                                                                   .
where,

main – function identifier
{,}, (,) – delimiter
int – keyword (data type)
a, b, c – variable identifier
main, {, }, (, ), int, a, b, c – tokens
%d   - is format specifier

You may like the following posts:



C Tokens

C tokens are the basic buildings blocks in C language which are constructed together to write a C program.
Each and every smallest individual units in a C program are known as C tokens.
C tokens are of six types. They are:

Keywords    : (eg: int,while,do)
Identifiers     : (eg: main, a,b,c)
Data type     : (eg: int,float..) 
Variables      :(eg: a,b,c)
Constants     :(eg: 2,3)
Operators   :(eg: +, /,-,*)
Strings        : ("g","Rajendra")
Special symbols  (eg: (), {})

//C tokens example program:

void main()
{
 int a, b, c;
 a = 2, b = 3;
 c = a + b;
 printf(“Addition of two no's = %d \n”, c);
 getch()
}                                                                                                                                                                                                   .
where,

main – function identifier
{,}, (,) – delimiter
int – keyword
a, b, c – varialble identifier
main, {, }, (, ), int, a, b, c – tokens