Posts

Showing posts from April 1, 2018

Introduction To Computer System

Image
Introduction to Computer A computer is an electronic device capable of performing arithmetic and logical operations. It can also store a large volume of information . Characteristics of Computer SPEED The speed with which the computer works can be understood by the units of measurement of time within a computer. They are : MILLI SECOND – 1/1000 TH OF A SECOND MICRO SECOND – 1/1000 TH OF A MILLI SECOND NANO SECOND – 1/1000 TH OF A MICRO SECOND PICO SECOND – 1/1000 TH OF A NANO SECOND STORAGE As already discussed a computer can store a large volume of information. The factors to be considered for storage are : •           RETREIVAL – IMMEDIATE •           SPACE – VERY LITTLE •           MEDIA – MAGNETIC MEDIA •           LONGIVITY – FOR EVER ACCURACY The accuracy of the computers is consistently high. Errors in the machinery may occur, but due to efficient error-detecting techniques, these very seldom lead to wrong results. Errors in computing are due to human rather than techno

Differences between Break and Continue | C Programming

Differences between Break and Continue in C Programming The major difference between break and continue statements in C language is that a break causes the innermost enclosing loop or switch to be exited immediately. Whereas, the continue statement causes the next iteration of the enclosing for, while, or do loop to begin. The continue statement in while and do loops takes the control to the loop's test-condition immediately, whereas in the for loop it takes the control to the increment step of the loop. The continue statement applies only to loops, not to switch. A continue inside a switch inside a loop causes the next loop iteration. Practically, break is used in switch, when we want to exit after a particular case is executed; and in loops, when it becomes desirable to leave the loop as soon as a certain condition occurs (for instance, you detect an error condition, or you reach the end of your data prematurely). The continue statement is used when we want to skip one

Differences between Puts and Gets in C Programming | C programming

Differences between "puts" and "gets" in C Programming We can read a string using the %s conversion specification in the scanf function. However, it has a limitation that the strings entered cannot contain spaces and tabs. To overcome this problem, the C standard library provides the gets function. It allows us to read a line of characters (including spaces and tabs) until the newline character is entered, i. e., the  Enter  key is pressed. A call to this function takes the following form: gets(s); where s is an array of char, i. e., a character string. The function reads characters entered from the keyboard until a newline is entered and stores them in the argument string s, The newline character is read and converted to a null character (\O) before it is stored in s. The value returned by this function, which is a pointer to the argument string s, can be ignored. The C standard library provides another function named puts to print a string on the display. A