The former is for strings, the later is for numbers (integers).
C#.net ProgramsProgram # 1:This program takes three positive numbers from user. Compute and display the average of the two larger numbers. using System;using System.Collections.Generic;using System.Text;namespace Average_of_three_Nos{class Program{static void Main(string[] args){string no1, no2, no3;int n1, n2, n3;int average;Console.WriteLine("Enter First Number");no1 = Console.ReadLine();n1 = Int32.Parse(no1);Console.WriteLine("Enter Second Number");no2 = Console.ReadLine();n2 = Int32.Parse(no2);Console.WriteLine("Enter third Number");no3 = Console.ReadLine();n3 = Int32.Parse(no3);average = (n1 + n2 + n3) / 3;Console.WriteLine("Average of three Numbers : "+ average);}}}Program #2:This program will take two positive numbers as its input and then find GCD of them.using System;using System.Collections.Generic;using System.Text;namespace GCD{class Program{static void Main(string[] args){Program obj = new Program();string no1, no2;int n1, n2;Console.WriteLine("Enter First Number");no1 = Console.ReadLine();n1 = Int32.Parse(no1);Console.WriteLine("Enter Second Number");no2 = Console.ReadLine();n2 = Int32.Parse(no2);int g=obj.find_gcd(n1, n2);Console.WriteLine("GCD=" + g);}int find_gcd(int a, int b){int c;if(a
Nothing: 'auto' is usable only in functions, and there it is the default storage class, so you don't have to use it at all.
volatile int means the code and fom outside from code can changes the value but in const volatile int, code cannot changes the value but fron ouside can change the value
The word non-function can mean practically anything, a variable, for example.int fun (int x) { return x+10; }int nonfun= 32;
nothing
Are you sure that these words (normal int and regular int) actually mean something?
Perhaps an example will help. extern int value; /* declaration */ int value; /* definition */ int value= 20; /* definition with initialization */
Let's look at an example. int a = 1; Here our variable is 'a' which is of type 'int'
The former is for strings, the later is for numbers (integers).
C#.net ProgramsProgram # 1:This program takes three positive numbers from user. Compute and display the average of the two larger numbers. using System;using System.Collections.Generic;using System.Text;namespace Average_of_three_Nos{class Program{static void Main(string[] args){string no1, no2, no3;int n1, n2, n3;int average;Console.WriteLine("Enter First Number");no1 = Console.ReadLine();n1 = Int32.Parse(no1);Console.WriteLine("Enter Second Number");no2 = Console.ReadLine();n2 = Int32.Parse(no2);Console.WriteLine("Enter third Number");no3 = Console.ReadLine();n3 = Int32.Parse(no3);average = (n1 + n2 + n3) / 3;Console.WriteLine("Average of three Numbers : "+ average);}}}Program #2:This program will take two positive numbers as its input and then find GCD of them.using System;using System.Collections.Generic;using System.Text;namespace GCD{class Program{static void Main(string[] args){Program obj = new Program();string no1, no2;int n1, n2;Console.WriteLine("Enter First Number");no1 = Console.ReadLine();n1 = Int32.Parse(no1);Console.WriteLine("Enter Second Number");no2 = Console.ReadLine();n2 = Int32.Parse(no2);int g=obj.find_gcd(n1, n2);Console.WriteLine("GCD=" + g);}int find_gcd(int a, int b){int c;if(a
I will explain in the easiest way the difference between the function and recursive function in C language. Simple Answer is argument of the function is differ but in the recursive function it is same:) Explanation: Function int function(int,int)// function declaration main() { int n; ...... ...... n=function(a,b); } int function(int c,int d) { ...... ...... ...... } recursive Function: int recursive(int,int)// recursive Function declaration main() { int n; ..... ..... ..... ..... n=recursive(a,b); } int recursive(int a,int b) { ..... .... .... .... } Carefully see, In the recursive Function the function arguments are same.
Nothing: 'auto' is usable only in functions, and there it is the default storage class, so you don't have to use it at all.
volatile int means the code and fom outside from code can changes the value but in const volatile int, code cannot changes the value but fron ouside can change the value
The word non-function can mean practically anything, a variable, for example.int fun (int x) { return x+10; }int nonfun= 32;
a variable having the datattype and name, an identifier is the name of the variable for example int x; here int x; is the variable x is the identifier
Unsigned int does not have a sign, meaning that it can be zero or a positive number in the range of data type (int). Signed data has a sign and can be positive, zero or negative.