Monday 29 September 2014

Assignment #1 (Concepts of Programming Languages Chapter 1 Problem Set)

a=Answer

Problem Set:

14.    Describe the advantages and disadvantages of some programming environment you have used?

a.    ~C~  
=Disadvantages=
does not have concept of OOPs(Object Oriented Programming)
There is no runtime checking in C language

=Advantages=
C language has variety of data types and powerful operators. Due to this, programs written in C language are efficient, fast and easy to understand.

15.    How do type declaration statements for simple variables affect the readability of a language, considering that some languages do not require them?

a.    maybe have affect on readability of a language and user or reader  must be found type variables before used the language

16.    Write an evaluation of some programming language you know, using the criteria described in this chapter.

Readability

C has two kinds of structured data types, arrays and records (structs), records can be returned from functions but arrays cannot   

Writability

C language has relatively convenient, rather than cumbersome, ways of specifying computations(For example,the notation count++ is more convenient and shorter than count = count + 1).

Reliability

In different compiler c have different option for compiling and running.c give only the concepts.

17.    Some programming languages—for example, Pascal—have used the semicolon to separate statements, while Java uses it to terminate statements.Which of these, in your opinion, is most natural and least likely to result in syntax errors? Support your answer.

a.    in my opinion, the possibility of a second language can result in a syntax errors, but the java language more or less result in than the pascal syntax errors because the user is more effective to use a semicolon at the end of the statement compared with each statement

18.    Many contemporary languages allow two kinds of comments: one in which delimiters are used on both ends (multiple-line comments), and one in which a delimiter marks only the beginning of the comment (online comments). Discuss the advantages and disadvantages of each of these with respect to our criteria


a.    The advantage of paired delimiters is that you can comment out areas of a program. The disadvantage of using only beginning delimiters is that they must be repeated on every line of a block of comments

No comments:

Post a Comment