We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

Assignment No. 01
SEMESTER Spring 2016
CS508- Modern Programming Languages

 

Total Marks: 20

 

Due Date: 18/05/2016

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit  if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is full or partially copied from (other student or ditto copy from handouts or internet).
  • Student ID is not mentioned in the assignment File or name of file is other than student ID.
  • The assignment is not submitted in .doc or .docx format.

Uploading instructions

Your submission must include:

 

  • Assignment should be in .doc or .docx format.
  • Save your assignment with your ID (e.g. bx020200786.doc).

Assignment submission through email is NOT acceptable

Objective

The objective of this assignment is

  • To give knowledge and understanding of syntax and semantic of Programming languages.
  • To be able to understand the basics of SNOBOL programming language.

 

Note:

Your answer must follow the below given specifications.

  •  Font style: “Times New Roman”
  •  Font color: “Black”
  •  Font size: “12”
  •  Bold for heading only.
  •  Font in Italic is not allowed at all.
  •  No formatting or bullets are allowed to use.
  • Your answer should be precise and to the point, avoid irrelevant detail.

 

Lectures Covered: This assignment covers Lecture # 01 - 12

Deadline

Your assignment must be uploaded/submitted at or before 18/05/2016.

 

 

 

 

 

Question: 01           10( 2+2+2+2+2) marks     

 

The study of programming languages can be divided into the assessment of their syntax and semantics while different constructs are the building blocks of these languages.

You are required to differentiate between syntax and semantics in your own words and write the syntax and semantics for the following constructs.

  1. While Loop
  2. If statement
  3. GOTO statement
  4. Array

 

Note: Do not specific to any language; you may use any language for syntax (or use general syntax).

      

 

Question: 02           10 (05 + 05) marks

 

SNOBOL language is mainly designed for string manipulation and handling, therefore, it has rich string manipulation mechanism and operators.

  1. Write a program in SNOBOL which define variables for street number, City name and District name. Use string concatenation operator which combine the values of all these variables in a new variable Address and print on the console.
  2. Write a program in SNOBOL which define a variable and store the string “I am a student of MCS”. Use pattern matching operator and GOTO statement to print “Pattern found” if the pattern matched otherwise “Pattern not found” on the console.

 

Note:  You need to write the code in an MS word file, furthermore, you do not need to compile programs, however they should be correct syntactically.

 

 

=====================================Ended=======================================

 

For any query about the assignment, contact at CS508@vu.edu.pk

 

GOOD LUCK

 

 

 

Share This With Friends......

+ Click Here To Join also Our facebook study Group.

This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue


..How to Join Subject Study Groups & Get Helping Material?..


Views: 2487

See Your Saved Posts Timeline

Replies to This Discussion

b. Write a program in SNOBOL which define a variable and store the string “I am a student of MCS”. Use pattern matching operator and GOTO statement to print “Pattern found” if the pattern matched otherwise “Pattern not found” on the console.
Answer:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("I am a student of MCS");
goto End;
NotFound:
Console.WriteLine("Pattern not found!");
End:
Console.ReadKey();

}
}
}

can u please upload the complete solution?

thanxxxxxxxxxxxxxxxxxxxxxxx alot  this really safe me

u have complete solution that i made with my own but i upload only a program because it is the hardest part of the assignment. Baqi khud se banao bhei

question 1 ha'hardest
'

yar semantic kia ha while ka syntax to likh liya ha lekin semantic smjh ni a rhi bta do plz

can you please upload question 2 (a) part. i only need that part.

send part 2 i send u part 1

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { Console.WriteLine("I am a student of MCS"); goto End; NotFound: Console.WriteLine("Pattern not found!"); End: Console.ReadKey(); } } } Read more at http://vustudents.ning.com/forum/topics/cs508-assignment-no-01-spri...

to teek ha yar

RSS

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service