

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Argue that every string in L(G) has an equal number of 0 s and 1 s.
S → S · S | a
Write the set equation corresponding to this grammar and give a solution to this equation.
#include <stdio.h>
int a, b;
int p(void) { int a, p; a =0; b=1; p=2; return p; }
void print( void) { printf(‘‘%d\n%d\n’’,a,b); }
void q(void) { int b;
a= 3; b=4; print(); }
main() { a=p(); q(); }
What values will be printed, when the program is parsed using (a) Lexical scope, and (b) Dynamic scope?