Basic Data Types In Java: There are two different types of data types used in java that are Primitive type Non-primitive type Primitive type: byte : The byte data type is useful for saving memory in large arrays. It saves memory the range of byte data type is -128 to +127.It is an 8- bit signed two’s complement integer. The byte default value is 0. Example: byte a=20; short : The short is as similar as byte but is 16-bit signed two’s complement integer. The range of short data type is -32768 to +32767. The short data type default value is 0. Example: short s=1000; char : The char data type is a single 16-bit Unicode character. The range of char data type is '\u0000' to '\uffff'. The Char datatypes are used to store any character. Example: char c ='J'; boolean : The boolean data type used to represent one bit of information. This data type is used to check true or false conditions. The Default value i
C Language Class 1 : Introduction to C Programming Language C was developed in the early 1970s by Dennis Ritchie at Bell Laboratories in USA . C was originally first implemented on the DEC PDP-11 computer in 1972. C was originally designed for writing system software but today a variety of software programs are written in C. C can be used on many different types of computers but is mostly used with the UNIX operating system. It is also called as ‘ Procedure oriented programming language ‘ The 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. Facts about C C was invented to write an operating system called UNIX . C is a successor of B language which was introduced around 1970 The language was formalized in 1988 by the American National Standard Institute (ANSI) . The UNIX OS was tot
==> Learning to program can be tough--just ask anyone who's done it! Fortunately, a lot of problems happen over and over again--I've put together 8 of the most common problems that you'll run into as a new programmer. 1. Undeclared Variables int main(){ cin>>x; cout< "Huh? Why do I get an error?" Your compiler doesn't know what x means. You need to declare it as a variable. int main(){ int x; cin>>x; cout< 2. Uninitialized variables int count; while(count<100 count="" cout="" pre=""> "Why doesn't my program enter the while loop?" In C++ variables are not initialized to zero. In the above snippet of code, count could be any value in the range of int. It might, for example, be 586, and in
Comments
Post a Comment