4. Characteristics of a Computer System User Defined Programs CPU Peripherals Networks Operating System (O/S) Applications Software (S/W) Hardware (H/W) Computer System
45. JAVA Keywords abstract double int strictfp boolean else interface super break extends long switch byte final native synchronized case finally new this catch float package throw char for private throws class goto protected transient const if public try continue implements return void default import short volatile do instanceof static while
52. Hello World Program public class HelloWorld { // A program to display the message // "Hello World!" on standard output public static void main(String[] args) { System.out.println("Hello World!"); } } // end of class HelloWorld
77. /* program to take in an array and an element value and find the element in the array */ #define N 10 #include <stdio.h> main () { int binary_search(int,int,int [],int); int a[N]= {2, 4, 6, 8, 10, 12, 14, 16, 18, 20}; int pos, x, start, end; printf ("Enter the number you are looking for:"); scanf ("%d",&x); start = 0; end = N-1; pos = binary_search(start, end, a, x); if (pos >= 0) printf ("The value %d is in position %d",x,pos); else printf ("The value %d is not in the array",x); return 0; }