Name of Student: Sap Id
Name of Student: Sap Id
Submission
Submission Assessment Group/ Deadline
Assignment ID Assignment Mode- Method- Individual- Weightage- Date of (Date and
-01 Title-Unit-1 Offline Offline Individual 02 Release time)
Assignment must be submitted by the Due Date and Time as mentioned above.
Assignment submitted after Due Date and Time and before the next 48 hours
will be marked late and will attract a penalty of X marks (out of the overall Y
marks, and it will be evaluated out of Y-X marks only). Assignment will not be
considered for evaluation subsequently (after 48 hours past due date and time),
and a score of zero will be awarded.
Submitted assignment must have your Full Name and SAP ID in the space
provided above this page in the Header.
Problems:
1. Let G be a Context Free Grammar for which the production Rules are given
below: S -> aB|bA
A -> a|aS|bAA
B -> b|bS|aBB
Drive the string aaabbabbba using the above grammar (using Left Most
Derivation and Right most Derivation).
2. Check whether the given grammar G is ambiguous or not.
A → AA
A → (A)
A→a
3. Find the number of tokens in the following C statement:
printf("i = %d, &i = %x", i, &i);