Professional Documents
Culture Documents
#include <stdio.h>
#include <ctype.h>
#include <stdbool.h>
#include <string.h>
int main() {
FILE *file;
// Print comments
printf("Comments:\n");
printComments(file);
printf("\n");
// Print keywords
printf("Keywords:\n");
printKeywords(file);
printf("\n");
// Print identifiers
printf("Identifiers:\n");
printIdentifiers(file);
printf("\n");
// Print operators
printf("Operators:\n");
printOperators(file);
printf("\n");
// Close the file
fclose(file);
return 0;
}
return false;
}
void printKeywords(FILE *file) {
char word[MAX_IDENTIFIER_LENGTH];
int index = 0;
int c;
bool isOperator(char c) {
char operators[] = "+-*/%=<>!&|^~?:.";
return false;
}
bool isIdentifierCharacter(char c) {
return isalnum(c) || c == '_';
}
//input.c
#include<stdio.h>
#include<stdlib.h>
//input.c is used to read this file and mention comments
int main(){
//Printing Hello World
printf("Hello World");
//Printed Hello WOrld
return 0;
//returning 0
}