Unit II Programming Languages C Computer Programs Software

































































- Slides: 65

Unit – II Programming Languages ‘C’

Computer Programs � Software refers to programs that make the computer perform some task. � A program is a set of instructions that tells the computer what to do. � When you have written a program, the computer will behave exactly as you have instructed it. It will do no more or no less than what is contained in your specific instructions.

Writing Programs �Learning to write programs requires two skills. � You need to use specific terminology and punctuation that can be understood by the machine; that is, you need to learn a programming language. � You need to develop a plan for solving a particular problem. This plan or algorithm is a sequence of steps that, when followed, will lead to a solution of the problem.

What Is a Computer Language? � A microprocessor is designed to “understand” a set of commands called an “instruction set” � All instructions must be provided to the CPU in its native language, called machine language. � If eight-digit binary codes are used, there are 256 numbered instructions from 0000 to 1111.

ASCII CODE

ASCII CODE

Machine Language � Instructions for adding two numbers would consist of a sequence of these eight-digit codes from 0000 to 1111. � Instructions written in this form are referred to as machine language. � It is the native language that the CPU “speaks” and “understands”. � It is possible to write an entire program in machine language. However, this is very time consuming and difficult to read and understand.

Machine Language �Advantages �It is the basic terminology that can understand by machine. �It can easily read by computer so execution of code is fast as compared to other language. �No translator is required to do an operation. �The computer can easily respond when input given to machine words.

Machine Language �Disadvantages �It is not easy to write it required core knowledge about programming, i. e. machine language program. �It can vary with respect to the configuration of the machine. �It is necessary to remember the address location where data can store. �Lot much time is required to write a code because it consists of combination 0 or 1 digit only. �Machine dependent language.

Programming Languages � Fortunately, special languages have been developed that are more easily understood (than machine language). � These special languages are called programming languages. � These languages provide a way to write computer programs that are understood by both computers and people. � Programming languages have their own vocabulary and rules of usage. � Some languages are very technical, while others are similar to English.

Assembly Language �The programming language that is most like machine language is assembly language. �Assembly language uses letters and numbers to represent machine language instructions. �An assembler is a program that reads the codes the programmer writes in assembly language and “assembles” a machine language program based on those codes. �However, assembly language is still difficult to read.

Comparing Machine Language & Assembly Language �For example, the machine code for adding two integers might be: 01000011101000111101010000010010101101000010 �While the assembly language code might be: LOAD A ADD B STORE C � This causes the number in A to be added to the number in B, and the result is stored for later use in C.

Assembly Language �Advantages � Assembly language is easier to understand saves time and effort by the software engineer. � It is easier to re-correct error and modify instructions in a program. � Assembly language has the same efficiency of execution as the machine level language because this is one-to-one translator between assembly language program and its corresponding machine language program. �Disadvantages � One of the major disadvantages is that assembly languages is machine dependent. A program written for one computer might not run in other computers with different hardware configuration.

Low Level Languages � Machine Language and Assembly Language are both called low-level languages. � In a low-level language, it is necessary for the programmer to know the instruction set of the CPU in order to program the computer. � Each instruction in a low-level language corresponds to one or only a few microprocessor instructions.

High Level Languages � A high-level language is any programming language that uses words and symbols to make it relatively easy to read and write a computer program. � In a high-level language, instructions do not necessarily correspond one-to- one with the instruction set of the CPU. � One command in a high-level language may correspond to many microprocessor instructions. � High level programming languages allow the specification of a problem solution in terms of human understanding language. (Eg. English)

High Level Languages Cont… �Many high-level languages have been developed. These include: � FORTRAN, COBOL, BASIC, Logo, Pascal, C, C++, Java, and others. �These languages simplify even further the terminology and symbolism necessary for directing the machine to perform various manipulations of data.

High Level Languages � Advantages � Reduce the number of instructions that must be written. � Allow programs to be written in a shorter amount of time than a low-level language would take. � Reduce the number of errors that are made, because… � The instructions are easier to read. � Are more portable (the programs are easier to move among computers with different microprocessors). � Disadvantages � High level languages are less efficient than assembly language program and require a bigger quantity of computer time for translation into machine instructions.

High Level Language Examples �Consider the following programs that add two numbers together: BASIC Pascal C++ LOGO I=3 program Add. It; int main( ) to add : I : J : K J=2 var { MAKE “I : 3 K=I+J i, j, k : integer; int i, j, k; MAKE “J : 2 begin i = 3; MAKE “K : I + : J i : = 3; j = 2; end j : = 2; k = i + j; k : = i + j; return 0; end. }

Interpreters and Compilers � Programmers writing in a high-level language enter the program’s instructions into a text editor. � The files saved in this format are called text files. � A program written in a high-level language is called source code. � The programs are translated into machine language by interpreters or compilers. � The resulting machine language code is known as object code.

Scripting languages � The scripting languages is a programming languages designed for integrating and putting across with other programming languages. � Scripting languages are turning more popular due to the emergence of web-based applications and security feature. � It gives a platform to employ to work with GUI (Graphical User Interface). Eg. Various online courses linked to various World Wide Web sites. � Some of the most widely used scripting language are Java. Script, VBScript, PHP, Perl, Python, Ruby, ASP and TCL.

Scripting languages �Advantages �Easy to learn and use. �Minimum programming knowledge or experience required. �Allow complex tasks to be performed in relatively few steps. �Allow simple creation and editing in a variety of text editors. �Take into account the addition of dynamic and interactive activities to web pages. �Disadvantages �Scripting languages is that executable code can inadvertently be downloaded from a distant host to a web browser’s machine, installed and run using the local browser’s interpreter.

Natural Language �Natural language is spoken communication that can adapt naturally by humans. �Natural languages not actually constructed as artificial languages and they do not truly appear as formal lectures. �No extra training needed to read it clearly. �A human language, such as English, Hindi is the natural languages.

Natural Language �Advantages � It can use for human communication. � Easy to understand by human, it directly related to feeling and emotions. � It can changes as region vise i. e. differently country with different languages. � No proper sequence maintained some time. �Disadvantages � It is not unique. � Natural language cannot understand by computer machine.

A Brief Chronology Early 1950 s 1957 FORTRAN 1958 ALGOL 1960 LISP, COBOL 1962 APL, SIMULA 1964 BASIC, PL/I 1966 ISWIM 1970 Prolog 1972 C 1975 Pascal, Scheme 1978 CSP 1978 FP 1983 Smalltalk-80, Ada 1984 Standard ML 1986 C++, Eiffel 1988 CLOS, Oberon, Mathematica 1990 Haskell 1990 s Perl, Python, Ruby, Java. Script 1995 Java 2000 C# “order codes” (primitive assemblers) the first high-level programming language the first modern, imperative language Interactive programming; business programming the birth of OOP (SIMULA) first modern functional language (a proposal) logic programming is born the systems programming language two teaching languages Concurrency matures Backus’ proposal OOP is reinvented FP becomes mainstream (? ) OOP is reinvented (again) FP is reinvented Scripting languages become mainstream OOP is reinvented for the internet

Why Programming? �To Develop Problem Solving Skills � It is very important to develop problem solving skills. Programming is all about solving problems. � Requires creativity and careful thought. � Analyze the problem and break it down into manageable parts (modules, procedures, functions) �It’s also rewarding!

Step 1 Good Programming Habits � 1. Analysis �Is the computer the appropriate tool for solving this problem? �Would the problem be better solved with human interaction or paper and pencil? �Sometimes human judgment is preferable.

Step 2 Good Programming Habits � 2. Specification of the Problem �Formulate a clear and precise statement of what is to be done (clear and unambiguous). �Know what data are available �Know what may be assumed �Know what output is desired & the form it should take �Divide the problem into sub problems

Step 3 Good Programming Habits � 3. 1 Develop an Algorithm �Algorithm: � a finite sequence of effective statements that when applied to the problem, will solve it. �Effective Statement: � a clear unambiguous instruction that can be carried out. �Algorithms should have: � specific beginning and ending that is reached in a reasonable amount of time (a finite amount of time). �This is done before sitting down at the computer.

Step 3 Good Programming Habits � 3. 2 Document the Program �Programming Style � Upper / Lower Case, Indenting, format �Comments �Descriptive Identifier Names � Variables, Constants, Procedures, Functions �Pre & Post Conditions � For each Procedure and Function �Output

Step 4 Good Programming Habits � 4. Code the Program �After algorithms are correct �Desk check your program � Without the computer, just paper and pencil � 4. 1 Type and Run the Program �Look for errors � Syntax Errors (semi colon missing, etc. ) � Logic Errors (divide by zero, etc. )

Step 4 Good Programming Habits � 4. 2 Test the Results �Does it produce the correct solution? �Check results with paper and pencil. �Does it work for all cases? � Border, Edge, Extreme Cases �Revise the program if not correct. �The coding process is not completed until the program has been tested thoroughly and works properly (recheck the specifications).

Step 5 Good Programming Habits � 5. Interpretation �The program may execute without any obvious errors. �It may not produce the results which solve the problem. � G. I. G. O Get what you ask for, not what you want. � Recheck your program with the original specifications GIGO (garbage in, garbage out) is a concept common to computer science and mathematics: the quality of output is determined by the quality of the input. So, for example, if a mathematical equation is improperly stated, the answer is unlikely to be correct. Similarly, if incorrect data is input to a program, the output is unlikely to be informative.

C - LANGUAGE OVERVIEW C is a general purpose high level language that was originally developed by Dennis M. Ritchie to develop the Unix operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard. The UNIX operating system, the C compiler, and essentially all UNIX applications programs have been written in C. C has now become a widely used professional language for various reasons. � Easy to learn � Structured language � It produces efficient programs. � It can handle low-level activities. � It can be compiled on a variety of computer platforms. 40

C - PROGRAM STRUCTURE �Before we study basic building blocks of the C programming language, let us look a bare minimum C program structure so that we can take it as a reference in upcoming chapters. �A C program basically consists of the following parts: �Preprocessor Commands �Functions �Variables �Statements & Expressions �Comments 41

C Hello World Example 1. The first line of the program #include <stdio. h> is a preprocessor command which tells a C compiler to include stdio. h file before going to actual compilation. 2. The next line int main() is the main function where program execution begins. 3. The next line /*. . . */ will be ignored by the compiler and it has been put to additional comments in the program. So such lines are called comments in the program. 4. The next line printf(. . . ) is another function available in C which causes the message "Hello, World!" to be displayed on the screen. 5. The next line return 0; terminates main()function and returns the value 0. 42

Token of C/C++ �The C programs are made up of different things termed as tokens. �The different tokens of C are its �character set �keyword �identifiers �constants and variables �data types �operators 43

character set �The character set of any programming language indicate the different characters the program can contain. Character set of “C” includes all the alphabets, digits and special symbol supported by the processor. Characters List included Alphabets (Upper case and lower case) A , B, C ……. . Z a, b, c…………z Digits (numbers) 0, 1, 2, 3, 4……. . 9 Special symbol (all those seen on a keyword, nothing besides that) <>{}()[], . ; : !? “‘/+*=%&#@ |-_$^(The names used for these symbol are given in the table) Other special characters Blank Space, Tab, Carriage Return (Enter Key) 44

Special symbol and their names Symbol Name of Symbol , Comma & Ampersand . Dot * Asterisk ; Semicolon - Minus Sign : Colon + Plus Sign ? Question Mark < Opening Angle (Less than sign) ! Exclamation Mark > Closing Angle (Greater than sign) | Pipe ( Left Parenthesis / Forward Slash ) Right Parenthesis Back Slash [ Left Square Bracket ‘ Single Quotes ] Right Square Bracket “ Double quotes { Left Brace ~ Tilde } Right Brace _ Underscore # Hash ^ Caret $ Dollar % Percentage 45

Keywords � The following list shows the reserved words in C. These reserved words may not be used as constant or variable or any other identifier names. Keywords auto else long switch break enum register typedef case extern return union char float short unsigned const for signed void continue goto sizeof volatile default if static while do int struct _Packed double 46

identifiers � A C identifier is a name used to identify a variable, function, or any other user-defined item. An identifier starts with a letter A to Z or a to z or an underscore _ followed by zero or more letters, underscores, and digits (0 to 9). � C does not allow punctuation characters such as @, $, and % within identifiers. C is a case sensitive programming language. Thus Manpower and manpower are two different identifiers in C. Here are some examples of acceptable identifiers: 47

Data Types �In the C programming language, data types refers to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted. �The types in C can be classified as follows: 48

Data Types Type Storage size Value range char 1 byte -128 to 127 or 0 to 255 unsigned char 1 byte 0 to 255 signed char 1 byte -128 to 127 int 2 or 4 bytes -32, 768 to 32, 767 or -2, 147, 483, 648 to 2, 147, 483, 647 unsigned int 2 or 4 bytes 0 to 65, 535 or 0 to 4, 294, 967, 295 short 2 bytes -32, 768 to 32, 767 unsigned short 2 bytes 0 to 65, 535 long 4 bytes -2, 147, 483, 648 to 2, 147, 483, 647 unsigned long 4 bytes 0 to 4, 294, 967, 295 float 4 byte 1. 2 E-38 to 3. 4 E+38 double 8 byte 2. 3 E-308 to 1. 7 E+308 long double 10 byte 3. 4 E-4932 to 1. 1 E+4932 49

Constants �The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. �Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There also enumeration constants as well. �The constants are treated just like regular variables except that their values cannot be modified after their definition. �Constants can be defined either by writing the keyword const before the data type or by using #define. ex…. . const type variable = value; 50

Variables � A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. � The name of a variable can be composed of letters, digits, and the underscore character. It must begin with either a letter or an underscore. Upper and lowercase letters are distinct because C is case-sensitive. type variable_list; int i, j, k; char c, ch; float f, salary; double d; type variable_name = value; int d = 3, f = 5; 51

Escape Sequences � There are certain characters in C when they are proceeded by a back slash they will have special meaning and they are used to represent like newline (n) or tab (t). Here you have a list of some of such escape sequence codes: Escape sequence Meaning \ character ' ' character " " character ? ? character a Alert or bell b Backspace f Form feed n Newline r Carriage return t Horizontal tab v Vertical tab 52

C-Operators �Arithmetic Operators �Relational Operators �Logical Operators �Bitwise Operators �Assignment Operators �Misc Operators ↦ sizeof & ternary �Operators Precedence in C 53

Arithmetic Operators � Following table shows all the arithmetic operators supported by C language. Assume variable A holds 10 and variable B holds 20 then: Operator Description Example + Adds two operands A + B will give 30 - Subtracts second operand from the first A - B will give -10 * Multiply both operands A * B will give 200 / Divide numerator by de-numerator B / A will give 2 % Modulus Operator and remainder of after an integer division B % A will give 0 ++ Increment operator increases integer value by one A++ will give 11 -- Decrement operator decreases integer A-- will give 9 value by one 54

Relational Operators � Following table shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then: Operator Description Example == Checks if the value of two operands is equal or not, if yes then condition becomes true. (A == B) is not true. != Checks if the value of two operands is equal or not, if values are not equal then condition becomes true. (A != B) is true. > Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. (A > B) is not true. < Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true. (A < B) is true. >= Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. (A >= B) is not true. <= Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. (A <= B) is true. 55

Logical Operators � Following table shows all the logical operators supported by C language. Assume variable A holds 1 and variable B holds 0 then: Operator Description Example Called Logical AND operator. If both the operands are non zero then condition becomes true. (A && B) is false. || Called Logical OR Operator. If any of the two operands is non zero then condition becomes true. (A || B) is true. ! Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false. !(A && B) is true. && 56

Bitwise Operators � The Bitwise operators supported by C language are listed in the following table. Assume variable A holds 60 and variable B holds 13 then: Operator Description Example & Binary AND Operator copies a bit to the result if it exists in both operands. (A & B) will give 12 which is 0000 1100 | Binary OR Operator copies a bit if it exists in either operand. (A | B) will give 61 which is 0011 1101 ^ Binary EXOR Operator copies the bit if it is set in one operand but not both. (A ^ B) will give 49 which is 0011 0001 Binary Ones Complement Operator is unary and has the effect of 'flipping' bits. (~A ) will give -61 which is 1100 0011 in 2's complement form due to a signed binary number. << Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. A << 2 will give 240 which is 1111 0000 >> Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. A >> 2 will give 15 which is 0000 1111 ~ 57

Bitwise Operators Binary AND (&) Operator Binary OR (|) Operator Binary OR (^) Operator X Y X&Y X Y X|Y X Y X^Y 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 Example 13 & 4 Example 13 | 4 Example 13 ^ 4 1 1 0 1 0 0 0 1 1 0 1 0 0 1 13 4 4 (~) Ones Complement 13 4 13 0 0 1 0 0 0 1 1 35 1 1 0 1 1 1 0 0 220 Example ~35 13 4 9

Bitwise Operators 0 0 1 1 0 1 =13 1 st Shift 0 0 0 1 1 0 1 =6 2 nd Shift 0 0 0 1 1 0 =3 0 0 1 1 0 1 =13 Right Shift (>>) (13>>2) Left Shift (<<) (13<<2) 1 st Shift 0 0 1 1 0 1 =26 2 nd Shift 0 0 0 1 1 0 0 0 =52

Assignment Operators � There are following assignment operators supported by C language: Operator Description Example = Simple assignment operator, Assigns values from right side operands to left side operand C = A + B will assign value of A + B into C += Add AND assignment operator, It adds right operand to the left operand assign the result to left operand C += A is equivalent to C = C + A -= Subtract AND assignment operator, It subtracts right operand from the left operand assign the result to left operand C -= A is equivalent to C = C - A *= Multiply AND assignment operator, It multiplies right operand with the left operand assign the result to left operand C *= A is equivalent to C = C * A /= Divide AND assignment operator, It divides left operand with the right operand assign the result to left operand C /= A is equivalent to C = C / A %= Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand C %= A is equivalent to C = C % A <<= Left shift AND assignment operator C <<= 2 is same as C = C << 2 >>= Right shift AND assignment operator C >>= 2 is same as C = C >> 2 &= Bitwise AND assignment operator C &= 2 is same as C = C & 2 ^= bitwise exclusive OR and assignment operator C ^= 2 is same as C = C ^ 2 |= bitwise inclusive OR and assignment operator C |= 2 is same as C = C | 2 60

Misc Operators ↦ sizeof & ternary � There are few other important operators including sizeof and ? : supported by C Language. Operator Description Example Returns the size of an variable. sizeof(a), where a is interger, will return 4. & Returns the address of an variable. &a; will give actaul address of the variable. * Pointer to a variable. *a; will pointer to a variable. Conditional Expression If Condition is true ? Then value X : Otherwise value Y sizeof() ? : 61

Operators Precedence in C � Here operators with the highest precedence appear at the top of the table, those with the lowest appear at the bottom. Within an expression, higher precedence operators will be evaluated first. Category Operator Associativity Postfix () [] ->. ++ - - Left to right Unary + - ! ~ ++ - - (type)* & sizeof Right to left Multiplicative */% Left to right Additive +- Left to right Shift << >> Left to right Relational < <= > >= Left to right Equality == != Left to right Bitwise AND & Left to right Bitwise XOR ^ Left to right Bitwise OR | Left to right Logical AND && Left to right Logical OR || Left to right Conditional ? : Right to left Assignment = += -= *= /= %=>>= <<= &= ^= |= Right to left Comma , Left to right 62

Formatted IO Functions � There are two formatted IO functions in C namely printf() to display some data on monitor and scanf() to accept data from keyboard. 1. printf() Syntax : printf(“Format string”, list of variables or expressions); EX. printf(“The number of building is %d”, b); 1. This statement will print the output with the value of b replaced with the format specifier. scanf() Syntax : scanf(“Format String”, address of variables); Here; format string can contain format specifier, field width and assignment suppression character. The assignment suppression character (*) is used to discard one of the user entered value. The address of the variable is obtained with the help of the address of operator(&). EX. scanf(“%d”, &b); This statement is used to accept a int type value from user in the variable x scanf(“%d %d %f “, &x, &y, &z); 63

Format Specifiers Sr. No. Format Specifier Data types 1 % d or %i For integer type of data 2 %f or %g For float type of data 3 %c For char type of data 4 %lf For double type of data 5 %Lf For long double type of data 6 %ld Long Integer 7 %h Short Integer 8 %u Unsigned Integer 9 %s String 10 %e Floating point data in exponential from 11 %o Octal value 12 %x Hexadecimal value 64

Unformatted IO Functions The unformatted IO functions do not have any format specifier. They are mostly used to accept and display only one character or a string (string is a set of characters to make a word or sentence). Function Description getch() This function is used accept one character from the user. getche() This function is used accept one character from the user and echo it (display it on the screen). getchar() This function is used accept one character from the user and echo it (display it on the screen) and also wait after that for the user to press the enter key. gets() This function is used to accept a string from the user. putch() or putchar() These function are used to display a character on the monitor puts() This function is used to display a string in the monitor. 65

MCQs. What is program? a. A set of instruction c. High level language b. A set of algorithm d. All of the above Correct Ans. A An identifier constant cannot start with— a. A number b. an alphabet. Correct Ans. C c. A special symbol other than underscore d. A capital letter Which of the following statements is incorrect? a. rem=3%2; b. rem=3. 14%2. 1; c. rem=’a’%’c’; Correct Ans. C d. None of the above A character variable can store how many characters at time? a. 1 character b. 8 characters Correct Ans. A c. 255 characters d. None of the above.

MCQs. What will be the output of the following program? #include<stdio. h> void main() { int a; printf(“%dn”, a); } a. Error b. 0 c. -1 d. Garbage value Correct Ans. D Which of the following will not increase the value of variable c by 1? a. C++; b. C=C+1; c. C+1 > =C; d. C + = 1; Correct Ans. C The result of relational operator is always____ a. either True or False b. either less than or more than c. either equal, less or more d. None of the above Correct Ans. A

MCQs. Find the output of following program #include<stdio. h> void main() { int x=0, y=0; x=(y=75)+9; printf(“n%d, %d”, x, y); } a. 75, 9 b. 75, 84 c. 84, 75 C programming language is a. object oriented programming language b. procedure oriented programming language c. function oriented programming language d. None of the above Correct Ans. C d. None of above Correct Ans. B

MCQs. Find the output of following program #include<stdio. h> int main() { int i=32, j=32, k, l, m; k=i|j; l=i&j; m=k^l; printf(“%d, %d, %d”n”, I, j, k, l, m); return 0; } a. 0, 0, 0 b. 0, 32, 32 c. 32, 32, 0 Which of the following identifier is correct a. #no b. _no c. @no d. &no Correct Ans. C d. 32, 32, 32 Correct Ans. B

MCQs. What is the oldest high-level(non-assembler) programming language. a. C b. Lisp c. Fortran d. Basic. Correct Ans. C Which of the following languages is the oldest ? a. Perl b. PHP c. Python d. Ruby Correct Ans. A An assembly language is a a. low level programming language b. Middle level programming language c. high level programming language d. Internet based programming language Correct Ans. A Translator for low level programming language were termed as a. Assembler b. Compiler c. Linker d. Loader Correct Ans. A Which language is considered to be the first fully object oriented language ? a. FORTRAN b. COBOL c. LISP d. C Correct Ans. E e. JAVA f. SMALLTALK

MCQs. The tool used by the programmer to convert a source program to a machine language object module is a Correct Ans. A a. Compiler b. Language translator c. Linker d. Preprocessor What are the major advantages of using a high-level language rather than internal machine code or assembler language ? a. Program portability b. Easy development c. Efficiency Correct Ans. A Which of the following are the scripting languages ? a. Java. Script b. VB Script c. ASP d. JSP All e. PHP Which of the following is not a type of programming language? a. Machine language b. High Level language c. Assembly language d. Natural language f. Perl g. Correct Ans. G Correct Ans. D

End of Chapter