C Program to Recognize Strings Under 'a*', 'a*b+', 'abb'
Compiler Design

Program for construction of LR Parsing table using C

ALGORITHM: Get the input expression and store it in the input buffer. Read the data from the input buffer one at the time and convert in to corresponding Non Terminal
  • October 15, 2024
C program to test whether a given identifier is valid or not
C Program Compiler Design

C program to implement simple code generator

ALGORITHM:1. Start2. Get address code sequence.3. Determine current location of 3 using address (for 1st operand).4. If current location not already exist generate move (B,O).5. Update address of A(for 2nd
  • October 15, 2024
c program
C Program

Write a C program to read name and marks of n number of students

#include <stdio.h> int main() { char name[50]; int marks, i,n; printf(“Enter number of students”); scanf(“%d”, &n); FILE *fptr; fptr=(fopen(“C:\student.txt”,”a”)); if (fptr==NULL){ printf("Error!"); exit(1); } for(i=0;i<n;++i) { printf("For student%dnEnter name: ",i+1);
  • October 29, 2024
Write a program to open a file using fopen()
C Program

Write a program to open a file using fopen()

#include<stdio.h> void main() { fopen() file *fp; fp=fopen(“student.DAT”, “r”); if(fp==NULL) { printf(“The file could not be open”); exit(0); } 1. Include Directives #include <stdio.h> #include <stdlib.h> #include <stdio.h>: Includes the
  • October 29, 2024
program to find the largest of n numbers and its location in an array
C Program

Program to find the largest of n numbers and its location in an array

#include <stdio.h>#include <conio.h> // Required for clrscr() and getch()int main() {int array[100], maximum, size, c, location = 1;clrscr(); // Clear the screen (only works in some compilers)printf("Enter the number of
  • October 29, 2024