• No results found

UNIT 2. Introduction to C:

N/A
N/A
Protected

Academic year: 2021

Share "UNIT 2. Introduction to C:"

Copied!
44
0
0

Loading.... (view fulltext now)

Full text

(1)

UNIT 2 Introduction to C:

C is like many other modern languages derived from ALGOL.In 1967, Martin Richards developed a language called BCPL at CAMBRIDGE UNIVERSITY (in UK.) a powerful and basic language was developed called B-LANGUAGE. This was developed by Ken Thompson. The original name of B-LANGUAGE is BCPL (Here BCPL stands for Basic Combined Programming Language and it is a preliminary language of B. Afterwards the BCPL was renamed called B-LANGUAGE from its first alphabet. This language has number of advance features than BCPL.

From 1972 (some research say 1970) at BELL-LABORATORIES (which is the part of AT & T) in U.S.A. by the scientist Dennis Ritche developed powerful software tool which has a big facility (compilation and linkage facility in combined form) called C-LANGUAGE. C-LANGUAGE was renamed from the BCPL's second alphabet.

After many years research, C language was developed and become popular. C-LANGUAGE has different versions from time to time. First version of C LANGUAGE is 1.0 in 1983, ANSI started working on c. the standard was approved in 1989and came to be known as ANSI C. in 1990 the ISO adopted the ANSI. this vesion as c89.in 1995, some minor changes were made to c89, the new vesion was c95. Afterwards an Object oriented programming (OOP) software was developed from the CLANGUAGE that is called C++. From the C++, Internet Programming Language Java was developed which is a completely platform independent. So we can say C is the basic beginner's language for the development of any system and application software. Latest version of the C language is C-99.

(2)

Q7. What are the Features or characteristics of C - Language?

C-Language has number of characteristics or features. Due to this C-Language becomes popular among the scientists for development of scientific software, as an entertainment for developing the games package and among businessman for the development of business application oriented tools. So C- Language has number of properties, which are explained as:

1. C – Language is rich in built-in functions or standard functions (library function)

2. C – programmes are very efficient and have fast execution speed.

3. C- Language has more data types than other languages (except Boolean operators as there in Pascal and Java).

4. C-Language has 40 keywords (reserve words) among which 32 are standard keywords, which are used, in daily routine programming. Eight keywords are optional which are used in low-level programming.

5. C- Language has more operators than other language.

6. C- Language programs are highly portable. Portability means a C program written in one environment can be executed in another environment e.g.

suppose if you have written a C-program in DOS environment or windows-95 environment, then it can be executed in Unix environment without any or little modification. Also a C-program written on the mainframe platform can be executed on the mini or microcomputers.

7. In C- Language you can take 0 to 15000 variables in a single program depending on the size of main memory and physical memory available.

Also to increment the value of variable is enough as compared to the other languages.

8. C- Language is a Structured Programming language. Structure programming means it has different modules and blocks like, if block, do block, for block, switch module etc. In other words a C-program can be written in any one of the three structures: sequence, selection and iteration.

9. C- Language has an important facility called extendibility. It means you can write your own file or functions and include in other programs. In other words a user can write number of function subprogram according to the requirement.

10. C- Language is very simple to learn and use.

11. C-compiler gives reliable and accurate results. It has a facility of warning which guides for better and efficient programming.

12. C- Language is used to develop graphics software by using graphics programming.

13. Also there are different versions of C-LANGUAGE, which are developed by different organizations. The commonly used brands of C are Borland C, Turbo C and ANSI C.

14. C-Language is also called middle level language because it has both types of features i.e. High level as well as Low level. High-level languages are very easy and fast to learn for readers. The syntax used for the high level language is similar to English statements. Also high-level language programs are not machine (hardware) dependent. Where as low level language programs are hardware dependent and it is are very difficult to create and modify these because of the dependence on the machine. So to develop a low level program there should be knowledge of hardware.

(3)

8) Uses of c:

1. c language is primarily used for system programming. The portability, efficiency, the ability to access specific hardware addresses and low runtime demand on system resources makes it.

2. good choice for implementing o.s and embedded system applications

3. c has been so widely accepted by professionals that compilers, libraries,and interpreters of other programming languages are often implemented in c.

4 some time c is intermediate language by implementations of other languages

5 c is used to implement end-user applications.

Q9. What are the Character Sets available in C?

Character Set means that the characters and symbols that a C Program can understand and accept. These are grouped to form the commands, expressions, words, c-statements and other TOKENS for C Language. Character Set is the combination of alphabet or character, digit, special characters and white spaces. More about a C program we can say that it is a sequence of characters. These characters from the character set play the different role in different way in the C-compiler.

Character set

1. Letter character 2. Digit

3. Special character 4. Empty Space Letter or Alphabet

In the character set, character or alphabet are represented by A-Z or a-z.

CLanguage is case sensitive so it takes different meaning for small and upper case letters. By using this character set C-statements and character constants can be written very easily. There are total 26 letters used in C-programming.

Digit

In the character set digit are represented by 0-9 or by combination of these digits. By using the digits numeric constant can be written easily. Also numeric data can be assigned to the C-tokens. There are total 10 digits used in the C-programming.

Special Characters

All the keyboard keys except alphabet, digits and white spaces are the special character. These are some punctuation marks and some special symbols used for special purpose. There are total 30 special characters used in the C-programming. Special characters are used for C-statements like to create an arithmetic statement +, -, * etc., to create relational statement <, >, <=, >=,

== etc., to create assignment statement =, to create logical statement &&, 11 etc. are required.

Empty space Character or White spaces

White spaces has blank space, new line return, Horizontal tab space, carriage ctrl, Form feed etc. are all used for special purpose. Also note that Turbo-C Compiler always ignores these white space characters in both high level and low-level programming.

(4)

10) Keywords and Identifiers (rules of identifiers)?

C-language has some reserve words, which cannot be used as variables or identifiers. These reserve words are keywords of C-language. These are the part of the C-Tokens. There are mainly 40 keywords among which 32 are used by many C compilers (also called Standard Keywords) for high level programming.

The standard keywords are:

auto extern sizeof default

Break float static long

Case for struct unsigned

Char goto switch do

constant if typedef register

continue int union void

Double return volatile else

Short enum while signed

Identifiers are some words or names, which identify whether it is a constant, variable or it is a keyword. These are the data names used by the programmer. Identifier gives us the unique identification having unique sequence of character (from the character set) used for special purpose.

Following are the some rules, which should be used for the fulfillment of the identifier requirement:

a) Identifier must be from the character set.

b) The first character of an identifier should be an alphabet or a letter and should not be a digit or a special character or a white space.

c) Identifier should not be a Reserve word or a Keyword.

d) Identifiers are always case-sensitive in the C-programming. For example the identifier BILL, Bill and bill are three different identifier used for different purposes.

e) Note that the character underscore from the character set should not be used as an identifier alone in the C-programming. It should be within the alphabets. For example valid be pay_rate and the invalid be -rate or _.

f) The length of an identifier should not be long. The maximum length of an identifier in all the C-compiler is 31 characters long. Some compiler has maximum 8 character long length like in the ANSI-C Compiler.

g) Hyphen (-) should not be used in an identifier.

h) Always avoid a single character as an identifier like a, in etc. It should be combination of the characters from the characters set like simple, interest etc.

i) Always use abbreviation for an identifier or a variable. For example, for simple_interest it should be si.

j) Always avoid using same named identifiers in the different case-letters (uppercase or lower case or both) in the same program or function sub-programs.

Some valid Identifiers are

pay, address, phone3, roll_number, r, R etc.

Some Invalid Identifiers are

12 th (first should not be a digit),

amount$ (special character at end should not be used),

(5)

net-pay (hyphen should not be used),

for (reserve word or keyword should not be used),

roll no (blank space or white space should not be used), etc.

As in the English language, in a paragraph all the words, punctuation mark and the blank spaces are called Tokens. Similarly in a C-program all the C-statements having Keywords, Identifiers, Constants, Strings, Operators and the Special Symbols are called C-Tokens. C-Tokens are the essential part of a C-compiler and so are very useful in the C-programming. A Token is an individual entity of a C-program. For example, some C-Tokens used in a C-program are

Reserve words float, do, if etc.

Identifiers pay, salary, rate etc.

Constants 300.9, 20, -44 etc.

Strings "Raman", "2002-03" etc.

Operators +9 * 9 <, && etc.

Special symbols (), { }, #, @, % etc.

11) Explain Constants in C:

.

Constant uses the secondary storage area. Constants are those quantities whose value does not vary during the execution of the program i.e. value is fixed. Constants in every language are the same.

For example, in the C-language some valid constants are:

const float pi=3.14;

In C-language constants are mainly of two types:

I. Numeric constant

II. Non-numeric or Character Constant

These are further sub-divided into more categories as shown below:

Numeric constant

Integer: Decimal, Octal, Hexa decimal Float : with or without exponent Character Constant (Non-numeric)

Single String

Backslash character I. Numeric constant:

These have numeric value having combination of sequence of digits i.e.

from 0-9 as alone digit or combination of 0-9 with or without decimal point (precision value) having positive or negative sign; these are further sub-divided into two categories as:

1. Integer Numeric Constant 2. Real or float Numeric Constant 1. Integer Numeric Constant:

(6)

Integer Numeric constants have integer data combination of 0-9 without any decimal point or without precision with any sign positive or negative sign.

These are further subdivided into three parts:

a) Decimal Integer Numeric Constant: These have no decimal point in it and are either be alone or be the combination of 0-9 digits. These have either +ve or -ve sign. For example: 124, -321, 0, 24, -8, +9 etc.

b) Octal Integer Numeric Constant: These consist of combination of digits from 0-7 with positive or negative sign. It has leading with 0 or o (upper or lower case) means Octal or octal. For example: 037, 00, -0450 etc.

c) Hexadecimal Integer Numeric Constant: These have hexadecimal data.

These have combination of 0-9 and A-F alone. The letters a-f or A-F represents the numbers 10-15.

2. Real or float Numeric Constant:

Some constants, which have a decimal point or a precision value within it having any positive or negative sign is called Real Numeric Constant. It is also called Floating Point Constant or Float value. For example some valid real numeric constant are as: 22.33, -9.8, 9.34E-5, 4.6E3 etc. Real Numeric constants are further divided into two parts. One is Mantissa Part and the other is Exponent Part. These two parts in a Real number are represented as:

mantissa E exponent

a). Mantissa part: The part without E and having a decimal point is called Mantissa Real part e.g. 25.3, -40.33, .5 etc. it is also called without exponent part

b). Exponent part: The exponent part has an E within it. It is also called a scientific notation. Here E has base value 10. It computes the power. For example: 3.5x 1 02 Can be written as 3.5E2, 4.2x- 5 can be written as 4.2E-5.

Similarly some more valid real numeric constant are as: 23.23 E -2, 57.9 E +22 etc.

II. Character Constant:

Character constants have either a single character or group of characters or a character with backslash used for special purpose. These are further subdivided into three types:

1. Single Character Constant 2. String Character Constant 3. Backslash Character Constant 1. Single Character Constant:

These have a single character within single quote ('). So these are also called single quote character constant. For example: 'a', 'M', '5', '+', '?' etc. are some valid single character constant.

2. String Character Constant:

A string is the combination of characters or group of characters. A string character constant or a string is enclosed within double quotes ("). So it is also called 'Double quote' character constant. For example: "Raja", "Hello", "1999",

"1999 - 2000", "5+3", "?+!" etc. are some valid string character constant. These are used for printing purpose or display purpose in the C-program's output statements. These can also be used for assigning the string data to the character (string) type variables.

(7)

3. Backslash Character Constants:

These are used for special purpose in the C-language. These are used in output statements like printf ( ), puts ( ), fprintf etc. Another name of Backslash character constant is 'Escape sequence'.

12) Escape Sequences:

13 What is a Variables:

Variables use the primary storage area. Variables are those quantities whose value varies during the execution of the program. Variables are basically memory locations, which are given names, and these locations are refereed in the program by variable names to read and write data in it. Variables are used for identification for entering the information or data. In variable you can enter integer value or real or character value (string value) according to the requirement.

Constant Meaning

'\a' or "\a" Audible bell (To ring a beep)

'b' or "\b" Backspace (it moves one space back) '\n' or "\n" New line (Move control to next line)

'\f' or "\f" Form feed (move one page next). It is used in the printing the hard copy only.

'\t' or "\t" Horizontal tab (it moves five spaces of tab).User can also set the Tab spaces according to his/her requirement.

'\v' or "\v" Vertical tab (it moves five lines down). It does not work in the Turbo-C compiler.

'\r' or "\r"

Carriage return (it replaces a word or string from the beginning of the other string). For example, an output statement in a C program: printf("\n Kite is Beautiful \r Bike"); will display the output: Bike is Beautiful.

‘\'’or "\' "

It displays a single quote in output statement. For example, an output statement in a C-program: printf("\n Kumar \'s address"); will display the output: Kumar's address.

'\" ' or "\" "

It displays a double quote in output statement. For example, an output statement in a C-program: printf("\n Want more data "yes/no" will display the output: Want more data "yes/no" :

\0' or "\0" Null character (it tells us the end of the string and used in string handling

(8)

14 . Explain Structure of C program.

A C-program can be developed from a general structure. The general structure of C-program is as shown below (which is also called overview of a C-program):

1. Documentation Section

2. Preprocessor directives or compiler directives Section or Macro.

i. Link Section ii. Definition Section 3. Global Declaration Section

4. Main C-program function called main

5. Beginning of the program by using left brace { a. Local declaration or local variable declaration;

b. Executable Part or C-executable statements;

6. End of the main program using right brace. } 7. Sub-program Section having user-defined functions.

Return-datatype function-name(parameter) {

local declaration;

executable statements;

return (argument);

}

Note that a function sub-program further has two sections: local declaration executable part of the function sub-program.

Documentation section or Comments:

In Documentation section we give a comment. Here comment statement is the Executable statement. Comment can be started by using "/*" and end with “*/”. Note that it is an optional section.

General syntax is:

/* Text Line or message line or comment line */

Also you can apply a comment more than one line (to the multiple lines) as

/* This is a sample C program

developed by Computer Students. */

2. Preprocessor Directives:

These are compiler preprocessor statements. These are also optional statements, but become compulsory if your compiler has INCLUDE and LIB subdirectories. Pre-compiler statements are divided into two sections. One is called Section, second is called Definition Section.

In the Link Section, we can link the compiler function like printf ( ), sqrt(

), fmod ( ), sleep ( ), clrscr ( ) etc. with the INCLUDE subdirectories, special header files like stdio.h, math.h, dos.h, conio.h, alloc.h,stdlib.h etc. It becomes very useful delimiters of compilation and the linkage phase. The header file with include subdirectories linked as:

#include <header file>

Or

#include "header file"

For example:

#include <stdio.h>

(9)

#include <conio.h>

#include "dos.h” /* This type of declaration specifies the header file is in the current working directory */

The second section is the Definition section by using which we can define a variable with its value. For this purpose define statement is used. The general syntax used is as:

#define variable name value

For example: following are the some valid definition statements:

#define pi 3.142

#define m 200

#define name "Yugandhar"

3. Global Declaration Section:

In some programs we use function sub-programs. So we declare some variables in the main program and function sub program having common name this creates the duplicity or redundancy in defining the variables. So we can take the common variable declaration above the main program, which is also called global variable declaration. The global variables are automatically initialized with zero; hence there is no chance of garbage value. The global variable declaration can be done by the statement as below:

data type vl,v2,v3 .. vn;

Here data types are int, float, char, double etc. vl,v2,v3,....vn is the list of global variables. For example: following are the some valid global declaration statement as:

int a,b,c;

float x,y,z;

char h, nm[ 10],name[ 10] [20];

4. main( ):

main( ) program is the C-program's main structure in which we process some statements. It is defined as below:

main( ) 5. Beginning of the main program:

The beginning of the main program can be done by using left curly braces.

{

a) Local Variable Declaration:

Variables which are used in the main program are declared by using the variable declaration statement having local variables. So it is called Local Variable Declaration Section. Local variables are declared as:

data type vl,v2,v3,…vn;

Here data types are int, float, char, double etc. For example, some valid local variable declaration statements are as:

int a, b, c;

float x, y, z ;

char nm, name[10], array[20] [30];

(10)

b) Executable Statements:

This section has reading, writing and processing statements having input/output function, library function, formulas, conditional statements, looping statements and function calling statements. In this section, all the C statements except control statements end with ";" (semicolon).

6. Ending of the main program:

By using the right curly brace } we can end the main program 7. User Defined Function Section:

In this section, we define the function sub-program or called program, which are called by a calling statement from the main program. Further, in this section every function sub-program has local declaration variable section and executable statement section similar to the main program. Every function sub-program ends with the return statement with or without any argument and return the computed value to the main program according to the user's requirement. The structure of a function sub-program is as:

Return-datatype function-name(parameter) {

local declaration;

executable statements;

return (argument);

}

15) how to compile and execute c?

16. Explain different Data Types in C.

C-language becomes powerful with the help of number of data types linked with it.. Data types vary according to their use. Different compilers have different data types. Actually variable type depends on the data type. Data type is the description of nature of data either in numeric forms (integer or real) or in character form (single character or string). There are mainly five types of data

(11)

types used in the Turbo-C compiler (four in the ANSI-C compiler). These all are described as:

1.Primary or Scalar or standard or Fundamental or simple data type 2.Secondary or Derived data type or Structured data type

3.User defined or enumerated or Typedef data type 4.Empty data type or void data type

5.Pointer data type

These above said data types are further sub-divided into more categories

1.Scalar or Standard Data Type:

A scalar data type is used for representing a single value only. It is also called Simple or Fundamental data type. As these are used at primary level in the high level language, so these are also called Primary data type. Simple data types has further some Standard data types. These are sub-divided into four categories

a) Integer data type

b) Float data type or Single precision real data type c) Double precision real or Double or Longfloat data type d) Character data type

The fundamental data types are explained in detail as:

a). Integer Data type:

These are of integral type. These are without decimal point. These are signed or unsigned. These data types are small int (short int), int, long int. Short int are also called small whole number. In of normal integer also called medium whole number and long int are also called long whole numbers.

These have 8 bit to 32 bit data and also have different ranges for inputting the data or assigning the data to the variable. The range for signed short int be -128 to +127 whereas unsigned short int have range 0 to 255 and both having 8-bit size. On the other side, the signed long int have the long range -2,147,483,648 to +2,147,483,647 having the 32 bits in size.

So the sizes in bits and ranges of other integer data types are as described in the given table below.

b). Real (float) Data Type:

Data type

scalar

derived User defined (enum)

void (empty)

pointer

int

union double

float

Arrays or Strings char

structure

(12)

These are also called precision real or single percussion value with a very small real number. These data type have at least one digit with a decimal point.

These are also signed or unsigned. These data types require storage space (size) 32 bits and have range 3.4E-38 to 3.4E +38 for inputting the data.

c). Double Data Type:

These data types have ver large floating data, so are also called large real number. These have double precision value having the 64 bits size and the range is 1.7E-308 to 1.7E+308.

Also there are long double or long float having 80 bits size. and have a very high range 3.4E-4932 to 3.4E+4932

d). Character Data Type:

These have either single character or combination of characters (called String). Characters are either signed or unsigned but mostly characters are used as unsigned type. These have 8 bit (1byte) internal storage. Also their range varies from 0-255 in the case of unsigned character and -128 to 127 in the case of signed character.

Below is the table with different data types having data bit size and ranges according to their data inputting as

Type size(bytes) Range

Char or Signed char 1 -128 to 127

Unsigned char 1 0 to 255

int or signed int 2 -32768 to 32767

Unsigned int 2 0 to 65535

Short int 1 -128 to 127

Or Signed short int

Unsigned short int 1 0 to 255

Long int 4 -2,147,483,648

Or Signed long int to

2,147,483,647

Unsigned long int 4 0to 4,294,967,295

Float 4 3.4E-38 to 3.4E+3 8

Double 8 1.7E-308to1.7E+308

Long double 10 3.4E-4932to3.4E+4932

(13)

2. Structured Data Type or Derived data type:

Derived data types are derived from the scalar data type by adding some additional relationship with the various elements of the primary or scalar data types. Note that derived data type may be used for representing a single value or multiple values. As these data types have different structure depending on the C-coding, these are also called Structured data type. These are also called secondary data type. These are further sub divided into three categories

a)Arrays and Strings(combination of characters or number with in “ “) b)Structures

c)Unions

Array: collection of homogeneous data type(similar data type) referenced by unique name

Structure and union means collection of heterogeneous (different data type) 3. Enumerated Data Type or User defined data type:

This is also used for type definition, i.e. it allows the users to define a variable or an identifier, which is used for representation of existing data types.

In other words, it provides us a way to define our own data type and also can define the value of a variable or an identifier stores into the main memory.

There are two types of User-defined data types. These are Enumerated and typedef data type. Enumerated data type can be defined as:

enum identifier {v1, v2, v3 .. . vn };

Here enum is the reserve word and vl,v2,v3,…vn all are the values, which are also, called enumeration constants. Also variable can be defined with the enumerated variable. For example, some values can be assigned to the enumerated identifier and the variable as:

enum month { “Jan”, “Feb”, “Mar”, …”Dec”};

or

enum year {1999, 2000, 2001, ... 2005};

#include <stdio.h>

enum week{ sunday, monday, tuesday, wednesday, thursday, friday, saturday};

int main(){

enum week today;

today=wednesday;

printf("%d day",today+1);

return 0;

}

Enumeration type conversion:

Enumerated types can be implicitly or explicitly cast. ex: the compiler can implicitly cast an enumerated type to an integer when required. however, when we implicitly cast an integer to an enumerated type. The compiler will either generate an error.

Ex: enum color{red,blue,black,green,yellow,purple,white};

Enum color x;

(14)

X=black+white;

Here 2+6=8, value of type int. however the left hand side of the assignment operator is of the type enum color.

Also there is another user-defined data type typedef. This is used to represent the existing data type i.e. by using this; the new type can be used in place of the old type anywhere in a C program. Also we can create the typedef variables (meaningful data type names) for improving the readability of the program. Typedef data type can be defined as:

typedef data-type identifier;

Here data-type may be int, float, double and char. Identifier gives us the information of new name given to the data type. Note that typedef cannot create a new type. For example, some valid typedef statements are as follows:

typedef int pay;

typedef float salary;

Here pay tells us the link with int and salary with the float and these can be used for the declaration of the variable as:

pay p1, p2;

salary s1, s2, s3;

4.Void or Empty Data Type:

Void or empty data type is used in the user-defined function or user defined sub-programs. These are used when the function sub-program returns nothing. Also it is used when a function or any sub-program have not any argument in it. We will study about this topic in detail in the user-defined function chapter.

5.Pointer data type:

Pointer data types are used to handle the data at their memory locations 17) How to declare a variable in C?

As we know a variable can be either of integer type or float or character type. So to declare a variable having their type for identification, we use a data type declaration statement. The data type declaration statement has the general syntax as

data type v1, v2…vn;

Where v1, v2 ....Vn are variables and data type may be either float, int or char. So we can say a variable can de declared by using data type declaration statement. Some valid data type declaration statements are as follows

int a, b, c;

float x, y, z;

char gender, name[10], city[10] [20];

Note that data type statement used in the local variable declaration section in the main program. Also it can be used in global variable declaration section before the main program. These two statements are described by below examples.

(15)

As Local Declaration:

main() {

int a, b, c;

float x, y, z;

char gender, name[ 10];

}

As Global Declaration

#include <stdio.h>

int a, b, c;

float x, y, z;

char gender, name[10];

main() {

statements;

}

18) What are Type Qualifiers? (Important)

Long, short, signed, unsigned are the type qualifiers. They specify special meaning to datatypes.

Ex:

long int, short int, signed int, unsigned int

19)Explain ‘C’ LANGUAGE ARCHITECTURE

If we develop the program in ‘c’ language. That program was not understand by the system. System understands only machine language. So there is a mediator to translate the Programming language into machine language that is compiler. Compiler takes the program and translates into

C API C LANGUAGE

SOURCE PROGRAM

COMPILER/

INTERPRETER

.OBJ FILE (MACHINE CODE)

LINKER

.EXE (NATIVE CODE)

(16)

machine language. If we execute that machine language we have another tool called linker, this linker takes the machine language code and also takes c library files from c API and executes the program and generates executable file(output file).

Whenever we compile the program ‘c’ compiler generates .obj file that is machine code. That machine code doesn’t execute directly. There is another tool linker that executes the machine code and generates .exe file.

20 How to assigning a value to variable?

We can assign a value to a variable by using assignment statement. The expression having assignment statement is also called assignment expression.

In an assignment expression, an assignment operator = is used. Also you can either assign a single value (constant) to a variable or by computing a formula and then the computed value can be assigned to that variable. Also you can assign a constant (fixed) value to a variable during the data type declaration statement. The general syntax for assigning a value to a variable is as

variable = constant; ex c=10;

or variable = expression; ex c=a+b+d;

or data type variable = constant; ex int c=10;

21. How to declare a constant in C?

Symbolic constant is a name substituted for a variable. Its value cannot be changed during the execution of the program. Symbolic constants are also called C-preprocessor. Another definition of C-symbolic constant is compiler directives because these constants give a direction to the compiler for assigning a constant value to a variable. The general syntax of symbolic preprocessor or symbolic compiler directive can be defined by using #define statement as:

#define <symbolic name> symbolic constant

Here symbolic name should be in capital letters, you can also use small letters in the Turbo C environment but not in the ANSI C environment. Symbolic names are also some times called constant identifiers. There are some rules used to define the #(hash) define statement. These rules are described as below:

1. Symbolic names are similar to a variable name. These are mostly written in capital letters. This is used to create a distinction between variables and symbolic names.

2. There should not be at the end of this statement.

3. There should be a blank space between symbolic name and symbolic constant.

4. There should be no space between # and define.

5. d in define statement should be in small letters.

6. Don't take symbolic name as variable in the main program.

7. Special characters cannot be used in symbolic name.

8. There should not be any = sign between symbolic name and value of symbolic constant.

9. Every symbolic name should be declared in separate line (separate define statement).

Some valid and invalid examples are as follows:

(17)

Valid : #define PI 3.142

#define NAME "kumar"

Invalid:

#define X=2.5 (because= sign is used)

# define MAX 10 (space between# and define statement)

#Define R 30 (because d of define is in capital letter)

#define M 20; (no semicolon should be used at end)

#define N $ 20 (no special character should be used

#define Me N 30 20 (multiple value cannot be used in the define statement)

#define manoj kumar 20 (due to long symbolic name)

#define a[ 10] 25 (array not allowed).

#dEFINE A 20 (define should be in small letters) 22. What are the delimiters in C?

In the C programming language, there are some special character used for special syntactic meaning and these are called C delimiters.

There are five powerful C delimiters used in a C program. These are described as:

Delimiter Meaning

: (colon) Used for label entry.

( ) (parenthesis) Used for expression and enclosing the arguments in the function declaration.

[ ] (square bracket) Used for describing the size for array.

{ } (curly bracket or brace) Used for beginning and ending of function, blocks and main program.

23. Explain different Operators available in C?

There are mainly eight operators used in C-language. These are : 1.Arithmetic operators

2.Relational operators 3.Logical operators 4.Assignment operators

5.Increment/Decrement operators

6.Conditional operators or Ternary operator 7.Bit wise operators

8.Special operators 1. Arithmetic Operators:

Arithmetic operators are used for arithmetic operations like Addition, Subtraction, Multiplication, and Division etc. Mostly arithmetic operators are used in the all the computer languages. These arithmetic operators were designed at the time of Abacus computing machine. There are mainly five arithmetic operators used in C-language. These all are given in the table below.

Operator Meaning

(18)

* multiplication

/ division

% modulus (remainder after division)

+ addition

- subtraction

Mixed mode Arithmetic: When one of the operands is real and the other is integer the

expression is a mixed mode arithmetic expression.

eg: 15/10.0 = 1.500000 15/10 = 1

10/15 = 0

-10.0/15 = -0.666667

2. Relational Operators:

These operators are used to create logical relationship between two operands. Relational operators are used for comparison purpose. The expression having two operands and one relational operator is called Relational Expression.

Mainly relational operators are categorized into two sections. One is comparison section and second one is equality section. There are mainly six relational operators used in the C-language. First four operators are in the comparison section and last two are in the equality section. These all are given in the table as:

Relational Operator Meaning

< less than

< = less than and equal to

> greater than

> = greater than and equal to

= = comparsion

= equal to

!= not equal to

These operators are used in if statement, switch statement, conditional operator statement, while statement, do-while statement and for statement.

These operators are mainly used for decision-making statement. These operators give the results in two branches, one is of True type and other is of false type (yes/no).

3. Logical Operators:

Logical operators are used for logical operations. These operations are used for compound relational expressions or logical expressions. When more than one relational expression occurs in a C expression using logical operators, then such type of expressions are called Compound Relational Expressions or logical expression. These are used in decision-making statement and some looping statements like if, switch, do while, while and for etc. These statements have either True (1) branch or false (0) branch. In other worlds, these are used to form complex expression to take the decision. There are mainly three logical operators used in C language as in the table below:

(19)

Logical Operators Meaning Priority

! Logical NOT Highest

(Not process the condition)

|| Logical OR Intermediate

(Process any one of the conditions.)

&& Logical AND Lowest (Process two or more than two relational expressions) Truth table of Logical AND and Logical OR:

A B A&&B A||B

0 0 0 0

1 0 0 1

0 1 0 1

1 1 1 1

Truth table for Logical NOT.

A !A

0 1

1 0

4. Assignment Operators:

Assignment operators are used for assigning an expression or value (constant) to a variable. Assignment operators are further subdivided into two types:

a) Simple Assignment Operator

b) Short hand Assignment Operator OR Arithmetic Assignment Operator

These are used in Assignment Expression or Arithmetic Assignment Expression.

a). Simple Assignment Operator:

Simple assignment operator is (equal to). The general syntax of simple assignment operator is as

V=constant value or expression;

Example x=10;

C=a+b;

where v is the variable and expression be any arithmetic expression.

b). Short hand or Arithmetic Assignment Operator:

These operators have equal to (=) sign with all the arithmetic operators.

The general syntax of short hand assignment or arithmetic assignment operator is as:

v arithmetic operator = constant value or expression;

Where v is the variable and expression is an arithmetic expression. Here the arithmetic operators used are *, /, +, -, %. For example, some valid expressions having simple assignment and short hand assignment are as shown in table:

(20)

Simple Assignment Shorthand Assignment

i=i+ 1; i += 1;

t=t*m-k; t *= m-k;

5. Conditional Operators:

Conditional Operators are also called ?: operators or Ternary operator.

These operators are used instead of block if statement (if-else statement). The general syntax of conditional operator is as :

exp1 ? exp2 : exp3;

Here first of all exp I will be computed, which is a conditional expression.

If exp1 is true, then exp2 will be executed. But if exp1 is false, then exp3 will be executed. Note that exp2 and exp3 are either a single constant value or a single variable or an arithmetic expression. For example, below is an if statement having a and b two variables as:

a= 10; b = 5;

if (a> b) c = a-b;

else

c = a + b;

The above if statement can be used by using the conditional operator in a single c statement as below:

c = (a > b) ? a - b : a+ b;

The above expression is also called conditional expression.

6. Unary operators: c supports 3 unary operators 1 unary minus,Increment , Decrement Operators:

These operators are also sometimes called special operators or unary special operators. Another name of Increment / Decrement Operator is Counter Operator. These are two as: ++ (increment operator) and - - (decrement operator). Increment operators are used for incrementing the value one by one.

Similarly decrement operators are used for decrementing the value one by one.

These are further subdivided into two categories:

a) Prefix increment / Decrement Operator

b) Postfix Increment/ Decrement Operator a). Prefix Operator.

In the Prefix Increment operator, first of all value will be incremented and then incremented value will be assigned to a variable. Similarly in the prefix decrement operator first of all value will be decrement and then decremented value be assigned to the variable. The general way is represented as:

++V; and - - V;

where v is the variable.

b). Postfix Operator:

In the postfix increment operator, first of all value will be assigned to the variable and then it will be incremented. Similarly in the postfix decrement operator, first of all value will be assigned and then it will be decremented. The general way to represent the postfix operator is as:

V++; and V - -;

where v is the variable.

(21)

For example, suppose x is a variable having value 7 then y is another variable which will be computed by using x variable. Here in case of increment operator, it is computed as:

X=7; x=7;

y =++x; (prefix increment) y=x++ ; (postfix increment) After processing: After processing

The value of y is 8. The value of y is 7.

The value of x is 8. The value of x is 8.

7. Bit wise Operators:

These are special operators for low-level programming. These operators are used for the manipulation of binary data (bits). Note that Bit wise operators should not be of float or double type. There are six types of Bit wise operator.

The table for Bit wise operators is as:

Bit wise Operator Meaning

& Bit wise AND

| (pipe symbol) Bit wise OR

^ Bit wise exclusive OR

<< Bit wise left

>> Bit wise right

~ (tilde) Bit wise NOT ( complement operator) Bitwise and(&)

Variable

b3 b2 b1 b0

x

1 1 0 0

y

1 0 1 0

z = x & y

1 0 0 0

Bitwise or(|)

.

Variable b

3

b

2

b

1

b

0

x

1 1 0 0

y

1 0 1 0

z = x | y 1 1 1 0 Bitwise XOR

Variable b

3

b

2

b

1

b

0

x

1 1 0 0

y

1 0 1 0

z = x ^ y 0 1 1 0

(22)

Bitwise NOT

Variable b

3

b

2

b

1

b

0

x

1 1 0 0

z = ~x

0 0 1 1

<< Left Shift

a = 13 Binary 00001101 b = 6 00000110 Consider a << 2 which Shifts two bits to left , that is 2 zeros are inserted at the right and two bits at the left are

moved out. 00001101 Moved 00110100

Finally the result is 00110100 . Deci 52 (13x4)

7. Special Operators:

These are used for special purposes in C-language. These operators are used in pointers, structures and unions etc. Some types of special operators are as:

1. Comma Operator 2. Sizeof Operator 3. Type Operator 4. Pointer Operator

5. Member Selection Operator 2. Comma Operator:

When number of statements occur in a C-program having a relation ship between expressions, then we can write all the expressions or statements in a single expression using comma operator. This is explained by below examples:

int a,b,c;

3. Sizeof () Operator:

It is also called compiler operator or compile time operator. It displays number of bytes (size) covered by a variable or an expression. The general syntax of sizeof operator is as

N=sizeof (v or e);

Here n should be of integer type. Here v is variable and e is an arithmetic expression. For example:

int a, b; float x = 1500; a = sizeof (x);

b = sizeof (x * 12-13/1000);

Note that result be in integer form stored in the variable a and b.

4 TYPE CONVERSION AND TYPE CASTING

Type conversion and type casting of variables refers to changing a variable of one data type into another.

While type conversion is done implicitly, casting has to be done explicitly by the programmer.

Type conversion is done when the expression has variables of different data types. So to evaluate the expression, the data type is promoted from lower to

(23)

higher level where the hierarchy of data types can be given as: double, float, long, int, short and char.

Example: type conversion is automatically done when we assign an integer value to a floating point variable ex:

float x;

int y=3;

x=y;

Now x=3.0

Type casting is also known as forced conversion. It is done when the value of a higher data type has to be converted in to the value of a lower data type. Ex: we need to explicitly type cast an integer variable into a floating point variable.

float salary=10000.00;

int sal;

sal=(int)salary;

Typecasting can be done by placing the destination data type in parentheses followed by the variable name that has to be converted.

5. Pointer Operator:

There are two types of pointer operators used in C-language. These are &

(it is not Bit wise AND) and * (it is not multiplication sign or an arithmetic operator). Pointer means it access the address of variable stored in the memory 6. Member Selection Operator:

These operators are used in structure and union. These operators are used to create a relationship between owner and member within a structure or union data. These are (dot operator) and -> (relationship operator or member operator).

24. What are the Order of Precedence or Hierarchy of operators?

Order of Precedence means the rank in which all the operators operate in a C-expression in arithmetic, relational or logical expression etc. Associatively tell us the order in which several operators with equal precedence are computed or processed in two directions, 'either from left to right or right to left. The order of precedence (hierarchy) and associatively between these operators is written in below table:

Operator Rank Description Associatively

( ) parenthesis left to right 1

[ ] square bracket left to right 1

+ unary plus right to left 2

- unary minus right to left 2

++ increment right to left 2

- - decrement right to left 2

! logical negation right-to left 2

~ ones compliment right to left 2

* indirection right to left 2

(24)

& address right to left 2

sizeof size of an object right to left 2

(type) type cast left to right 2

* multiplication left to right 3

/ division left to right 3

% modulus left to right 3

+ addition left to right 4

- subtraction left to right 4

<< left shift left to right 5

>> right shift left to right 5

< less than left to right 6

< = less than or equal to left to right 6

> greater than left to right 6

> = greater than or = left to right 6

== equality left to right 7

!= inequality left to right 7

& Bit wise AND left to right 8

^ Bit wise XOR left to right 9

| Bit wise OR left to right 10

&& logical AND left to right 11

| | logical OR left to right 12

? : conditional expr right to left 13

= assignment operator right to left 14

, comma operator left to right 15

25. What are the Input / Output Statements available in C?

Input Statements:

Input statements are used for reading integer, real, character, string and mixed type data. For this purpose some standard input functions are used, which are embedded in stdio.h (standard input output header file). These are of five types as below:

1. getchar( ) 2. scanf( ) 3. gets ( ) 4. getch( ) 5. getche( )

1. getchar( ):

This function is used for reading a single character from the keyboard.

Note that the variable in which you want to store a single character should be of character type. The general syntax is as:

char v;

v = getchar( );

Where v is the variable of character type.

For example:

(25)

char x;

x = getchar( );

A simple C-program to read a single character from the keyboard is as:

/* To read a single character from the keyboard using the getchar statement */

#include<stdio.h>

#include<conio.h>

main ( ) {

char x;

printf ("\n Press any key from the keyboard");

x = getchar( );

}

2. scanf ( ):

The scanf input statement is used for reading mixed data type. You can read integer, float, character, hexadecimal, octal, decimal data by using its control codes or format codes. The general syntax is:

scanf ("control string ", &v1, &v2, &v3, ... &vn);

Where arg1, arg2 ... argn are the arguments for reading and v1, v2... vn are all the variables. Here control string has some format codes or format specifier or conversion characters used for different data types. The scanf format code (specifier) is as shown in the below table:

Format Code Meaning

%c to read a single character

%d to read a signed decimal integer (short)

%ld to read a signed long decimal integer

%e to read a float value exponential

%f to read a float (short) or a single precision value

%if to read a double precisian float value

%g to read a float double

%h to read a short integer

%i to read a integer (decimal, octal, hexadecimal)

%o to read an octal integer only

%x to read a hexadecimal integer

%u to read an unsigned decimal integer (used in pointers)

%s to read a string

%[..] to read a string of words from the defined range

%[^] to read a string of words f\which are not from the defined For example, suppose you want to read a single character from the keyboard,

an integer numeric value, a numeric value having decimal point (real or float value)

(26)

and a string , then the procedure to read all these different types of values by using the

scanf() input statement is described in the below simple C program procedure as:

main ( ) {

char x, y[20];

int a;

float z;

printf ("\n Enter a single character, name, integer data and a real value");

scanf ("\n%c %s %d %f “, &x, y, &a, &z);

getche( );

}

3. gets ( ):

The purpose of the gets( ) statement is to read a string. It will read a string until you press enter key from the keyboard. It will mark null character ('\O') in the memory at the end of the string when you press the enter key. The general syntax is as:

gets (V);

Here v is the string variable i.e. char variable (character type).

For example:

char x[80];

gets (x);

Now if you type "vinoothna", then x string variable will store the value

"vinoothna".

4. getch( ):

It will store any value (a single character) from the keyboard and also displays it on the screen. The general syntax is as follows:

getch ( );

If you press 1, then it will not display the output on the screen and it will store the data in the garbage. It can also be used at the end of the 'program to terminate the output from output screen to the program editor screen.

5. getche ( ):

It will store any value (a single character) from the keyboard and also displays it on the screen. The general syntax is as follows:

getche ( );

If you press 1, then it will display I on the screen. If you press enter key or space then it will display blank space on the screen. It can also be used at the end of the program to terminate the output from output screen to the program editor screen.

Output Statements:

Output statements are used for writing, displaying or printing integer, real, character, string and mixed type data. For this purpose C-compiler has some standard output functions, which are embeded in stdio.h file. These are of three types as below:

1. putchar ( ) 2. printf ( )

(27)

3. puts ( ) 1. putchar ( ):

Putchar( ) is an output statement. The purpose of putchar statement is to display a single character on the screen. The general syntax of putchar is

putchar (v);

where v is the variable of character type in which a single character data is stored.

For example, Suppose x is a character type variable having a value 'R' and it can be displayed by using the putchar as:

char x;

putchar (x);

2. printf ( ):

The printf statement is used to display a text message or a value stored in the variable. The general syntax used is as:

printf ("Control string", v1, v2 ... vn);

or

printf ("Message line or Text line");

Where v I, v2, ... vn are all variables.

The control string uses some printf( ) format codes or format specifier or conversion characters. These all are discussed in the below table as

Code Meaning

%c to print a single character

%s to print a string

%d to print a signed decimal integer (short)

%ld to print a signed long decimal integer

%f to print a signed float or single precision real value

%lf to print a signed double precision value

%e to print an exponent float

%g to print a double

%o to print an octal number

%x to print hexadecimal no.

%u to print an unsigned integer

3. puts ( ):

The purpose of the puts statement is to the print or display a string inputted by the gets statement. The general syntax of puts statement is

puts (V); or puts ("text line");

Where v is the string variable.

For example: "I am a good boy" is a string stored in name variable. Then it can be printed by using puts( ) statement. It is described by using the C program as:

main ( ) {

char name[20];

(28)

gets (name);

puts ("you r name is”); puts (name);

getche( );

}

26) Formatted Output Specifications:

The formatted output specifications are similar to the scanf specifications.

Some specifications are illustrated as follows:

Integer Specification:

The format specification for printing an integer value is as:

%wd

Here w is for total width for printing and d for integer. Here if the numeric data is greater than the specified width, then it will print the complete data. Note that the Numeric number or data will be always written at the right justification in the given field and there be some leading blanks, which would appear on the screen at the displaying data field area. For example:

Format Output

printf ("%d", 2345); 2345

printf ("%6d", 2345); 2345

printf ("%-6d", 2345); 2345

printf ("%06d", 2345); 002345

Real Specification:

The output of real number displayed in the decimal notation. The general format specification is as follow:

% w.pf or %w.pe

Here w is total width and p is the decimal width or precision width, f is for float data (signed and short) and e for exponential float data (signed and long).

The value displayed will be rounded upto p decimal places and also will be printed at the right justified position in the field of w columns. Leading blanks and trailing zeros will also appear. The default precision is 6 decimal places.

Some commonly used examples are:

If y = 34.6754 be the inputted value, then the outputs be as below:

Format Output

printf ("%7.4f”, y); 34.6754

printf ("%7.2f”, y); 34.68

printf ("%-7.2f”, y); 34.68

printf ("%07.2f”, y); 0034.68

Character Specification:

A single character can be displayed using putchar() statement. More than one character can be displayed by using printf() statement having the width specified syntax as follows:

%wc

Where w is width of characters and c is for characters. For example, if the character variable a has inputted data "Amritsar" in the following statement as:

char a;

printf ("%3c", &a);

Then value assigned to a will be "Amr".

(29)

String Specification:

The format specification for displaying output string is similar to the real specification. The general syntax is as follows:

%w.ps

Where w is the total width of the field and p is the number of characters displayed in w width, s stands for string. Strings are right justified. For example, if nm is a character variable having data "Raj Kumar Mandav", which is defined by the data type declaration statement as:

char nm[20];

The various format specifications are:

Format Output

%s Raj Kumar Mandav

right justified

%20.10s Raj Kumar

left justified

%-20.10s Raj Kumar

27. What are the Character Test Functions:

Character test functions are used with getchar and putchar statements.

These functions are always used with decision making if statements and looping statements. The table having some character Test functions are illustrated as below:

Function Meaning

isalnum (v) Is v an alphanumeric character

Here v should be a character type variable.

( It can be defined as: char v; )

isalpha (v) Is v an alphabetic character

i.e. A-Z or a-z.

isdigit (v) Is v a digit i.e. numeric value from the range 0-9.

isprint (v) Is v a printable character.

ispunct (v) Is v a punctuation character.

isspace (v) Is v a blank space character.

islower (v) Is v a lower case character.

isupper(v) Is v an upper case character.

tolower (v) It convert upper case character variable v to the lower case character.

toupper(v) It converts lower case character variable v to upper case character variable.

All the above functions are linked with the "ctype.h" header file and should be defined in the link section of the C program.

Explain any 4 unary operators in c?(important)

(30)

- , ++, --, ! are the unary operators.

28 What is a preprocessor Or Explain Macro or Macro Expansion Directives?

Preprocessor directives are commands, which are executed by C preprocessor before the program is assigned to the compiler for compilation. In other words, these are used to instruct the compiler to pre-process the source code in a specific way. These are also called C Macro. Every C preprocessor directive start with # symbol. Usually preprocessor directives appear at the beginning of the program, but it is not necessary condition, these can be written anywhere in the program, the only condition is that they should appear before the portion of program requiring it. Following are some popular preprocessor directives:

(i). #define (ii). #include

(iii). #ifdef, #else, #endif (iv). #if, #elif

(v). #undef (vi). #pragma

(vii). ## (token pasting operator) (i). #define:

#define is used to make macro definition in a C program. About this pre processor, you have studied in symbolic constant. For example, below is a valid definition statement:

#define MAX 100

Here we define a constant MAX with its value 100. Whenever program encounters MAX, it is replaced to 100. Do not speak for itself, what it is, but from MAX. One can understand its meaning that it has maximum value. It also enhance modifiability as one has to change just once and all the instances are automatically changed.

Macro definition with argument:

Its functionality is the same as the preprocessor, but initially it is quite different in execution. In function the control is passed to the function code, whereas in Macro the name is replace by code. The functions save the memory space and so Macro make program faster, but larger as compared to the function. For example, below is a simple C function subprogram using the macro with argument as:

# define CUBE(Y) {Y*Y*Y}

main( ) {

int a,b;

printf("Enter number whose cube wants to evaluated:");

scanf("%d",&a);

b=CUBE(a);

printf("%d is the resultant value of Entered Cube ",b);

getch( );

}

Here the b = CUBE(a) will make the macro and replace it by b=(a*a*a).

Hence the computed resultant value cube will be stored in variable b.

(31)

Nesting of macros:

We can use a macro in the definition of another macro.

#define square(x) ((x) *(x) )

#define cube(x) (square(x)*(x)) (ii). # include:

This is used to include the header files in the link section area containing the functions to be used in the program. For example, it can be written as:

#inc1ude<stdio.h>

This will include the stdio.h file from include sub-directory of the Turbo-C (tc) directory. Generally its path is -c:\tc\include. We can also give the command for file inclusion from some other path (from another drive and directory) as:

# include "c:\xyz\arvind\abc.c";

If we are to include the file from the directory running the program, then we can write it as:

#include "dfr.c"

(iii). Conditional preprocessor directives (#ifdef, #else, #endif):

If there is a need to compile a portion of the program conditionally, then we can use these directives. For example, below are the some popular conditional preprocessor directives as:

#if defined (MAX)

#define MIN 20

#else

#define MAX 100

#define MIN 20

#endif

If MAX constant had been defined earlier than #if, then only MIN 20 will be defined, otherwise both the MAX and MIN will be defined.

(iv). #if and #elif :

These are used when there is branched conditions or nested conditions.

For example, below is the procedure to illustrate concept of this directive:

# if code = =30

printf("color is RED");

#elif code = =40

printf("color is Blue");

#elif code = =50

printf("color is Green");

#elif code = =60

printf("color is RGB");

#endif

If instead of #if.... #elif , #if- #else have been used, then the same number of #endif have to be used as many there are W. But by using #if ...

#elif the number of #endif is reduced to one. Thus enhance the readability and compactness of the code.

(v). #undef:

(32)

#undef preprocessor directive is used to undefined a macro which have been earlier defined in the program by using the #define statement. For example, below written is the procedure to explain the use of #undef directive:

#define ABC 100 main( )

{

#ifdef ABC

printf("abc have been defined");

#undef ABC

#endif

#ifdef ABC

printf("this will not be printed “);

#endif getch( );

}

(vi). #pragma:

This is a powerful directive used mainly in the low level programming. i.e.

pragma. is a C preprocessor directive, which allows it to write assembly language statements into the program of a C language. The general syntax used is as:

#pragma inline

asm (type here assembly language code) (vii). ## (Token pasting operator)(merge operator):

This preprocessor statement is used to concatenate the items in the C language. ## in C is called token pasting operator. For example, to illustrate this operator, the procedure be written as below:

#define concatenate (a) printf("a ## 5i %d ",a##5);

main() {

concatenate(5);

}

Here the output will be 55.

29 Explain different Control Statements available in C?

In the term software or computer programming, it has a set of instruction (in simple or complex form,) called Program. These instructions are also called statements, which occurs sequentially or in either conditional way or in the iterative way. To handle such types of statements, some flow controls required.

These flow controls are called Control statements.

References

Related documents

clinical faculty, the authors designed and implemented a Clinical Nurse Educator Academy to prepare experienced clinicians for new roles as part-time or full-time clinical

matrices of the multivariate time series data of solar events as adjacency matrices of labeled graphs, and applying thresholds on edge weights can model the solar flare

The tense morphology is interpreted as temporal anteriority: the eventuality described in the antecedent is localised in the past with respect to the utterance time.. Compare this

Because this method contains all the elements regarding the rockfall hazard (slope height, geologic character, volume of rockfall/block size, climate and presence of water on slope

• Declaration of function optional when a function declared with argument that data type only should be used in calling and definition.  Function should return a

Our framework can accommodate these two outcomes: when trade costs are high, firms spread evenly between the two locations to supply local demand at low cost, leading to

1.5.2 Extends Current Methods to Utilize Performance Metrics to Determine Value A primary result of this research effort is to provide a sound approach to using both

The chapter consists of a history of affirmative action debate and a discussion of the social, political, economic, and legal aspects of affirmative action that have an impact on