The C language was developed at AT & T (American Telegraph & Telephone) Bell Laboratories in the early 1972's by a system programmer named Dennis Ritchie. It was written originally for programming under an operating system called UNIX which itself was later rewritten almost entirely in C. Its name encrypted as C, derives from the fact that it is based on an earlier version written by Ken Thompson, another Bell laboratories system engineer. He adapted it from a language that was known by the initials BCPL (Basic Combined Programming Language). Thompson derived his programming language name as B, the first of the initials BCPL. When the language was modified and improved to its present state, the second letter of BCPL, C was given to it. The C language is often described as a middle level language. It permits programs to be written in much the same style as that of most of high-level programming language. It also interacts with the inner workings of the computer. The American National Standards Institute (ANSI) has established certain standards for C which is known as ANSI C in addition to the original version of C developed by Dennis Ritchie. The another popular version of C is Turbo C.
Like any other variables, we can also pass entire array to a function. An array name can be named as an argument for the prototype declaration and in function header. When we call the function no need to subscript or square brackets. When we pass array that pass as a call by reference because the array name is address for that array. /* Program to illustrate passing array to function */ #include<stdio.h> void display(int) ; /* function prototype */ main( ) { int num[5] = {100, 20, 40, 15, 33, i ; clrscr( ) ; printf (“\n The content of array is \n”) ; for (i=0; i<5; i++) display (num[i]) ; /*Pass array element fo fun */ getch{ } ; } void display(int n) { printf (“\t%d”, n ) ; } Output: The content of array is 100 20 40 15 3 /* Program to read 10 numbers from keyboard to store these num into array and then c...
Comments
Post a Comment