#include<stdio.h>#include<conio.h>#include<string.h>void main(){char str1[21],str2[21];int i,j,a[20],b[20];int add[21]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; printf("n Enter number 1:"); for(i=0; i<21; i++) { str1[i]=getchar(); } printf("n Enter number 2:"); for(i=0; i<21; i++) { str2[i]=getchar(); } //converting char to integer for(i=0; i<20; i++) { a[i]=(int)str1[i]-48; b[i]=(int)str2[i]-48; } printf("n Print Number 1:"); Read More …
Month: March 2016
Write a program in C language for addition of two numbers which have at least 20 digits each
#include<stdio.h>#include<conio.h>#include<string.h>void main(){char str1[21],str2[21];int i,j,a[20],b[20];int add[21]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; printf("n Enter number 1:"); for(i=0; i<21; i++) { str1[i]=getchar(); } printf("n Enter number 2:"); for(i=0; i<21; i++) { str2[i]=getchar(); } //converting char to integer for(i=0; i<20; i++) { a[i]=(int)str1[i]-48; b[i]=(int)str2[i]-48; } printf("n Print Number 1:"); Read More …
Default Value of Data Types in Java
Data Type Default Value (for fields) byte 0 short 0 int 0 long 0L float 0.0f double 0.0d char ‘u0000’ String (or any object) null boolean false Live Example : Default value of Data Type Sample Program that will illustrate Read More …
Default Value of Data Types in Java
Data Type Default Value (for fields) byte 0 short 0 int 0 long 0L float 0.0f double 0.0d char ‘u0000’ String (or any object) null boolean false Live Example : Default value of Data Type Sample Program that will illustrate Read More …
Default Value of Data Types in Java
Data Type Default Value (for fields) byte 0 short 0 int 0 long 0L float 0.0f double 0.0d char ‘u0000’ String (or any object) null boolean false Live Example : Default value of Data Type Sample Program that will illustrate Read More …
Some Rules of Variable Naming Convention
Variable names are case-sensitive. A variable’s name can be any legal identifier. It can contain Unicode letter,Digits and Two Special Characters such as Underscore and dollar Sign. Length of Variable name can be any number. Its necessary to use Alphabet at the start (however Read More …
Some Rules of Variable Naming Convention
Variable names are case-sensitive. A variable’s name can be any legal identifier. It can contain Unicode letter,Digits and Two Special Characters such as Underscore and dollar Sign. Length of Variable name can be any number. Its necessary to use Alphabet at the start (however Read More …
Some Rules of Variable Naming Convention
Variable names are case-sensitive. A variable’s name can be any legal identifier. It can contain Unicode letter,Digits and Two Special Characters such as Underscore and dollar Sign. Length of Variable name can be any number. Its necessary to use Alphabet at the start (however Read More …
Primitive Data Types in Java Programming Language
Data type is nothing but the type of the data. Each Variable in Java must have certain type associated with it which tells us what kind of data a variable can store. Data Types in Java Programming Language are classified Read More …
Primitive Data Types in Java Programming Language
Data type is nothing but the type of the data. Each Variable in Java must have certain type associated with it which tells us what kind of data a variable can store. Data Types in Java Programming Language are classified Read More …