Posts

Passing value by reference method in C#

Image
Passing value by a reference method in C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MYPROJECT.startup {         class startupday1         {             static void Main()             {             int y = 0;                          func(ref y);                 Console.Write("new value is {0}\n", y);                 Console.Write("new value is {0}\n", func(ref y));                 Console.ReadKey();              }              static int func(ref int x)           ...

Passing value without reference in C#

Image
      Passing value without reference in C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MYPROJECT.startup {         class startupday1         {             static void Main()             {             int y = 0;                          func( y);                 Console.Write("new value is {0}\n", y);                 Console.Write("new value is {0}\n", func(y));                 Console.ReadKey();              }              static int func( int x)         ...

Introduction to methods in C#

Image
   Introduction to methods in C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MYPROJECT.startup {     class Startupday1     {         static void Main()         {             Console.Write("sum is {0}\n", um("Piyush","jaiswal"));             Console.Write("sum is {0}\n",um(15,55));             Console.Write("sum is {0}\n",um(24.6, 24.4));             Console.ReadKey();        }         static int um(int x, int y)         {             int sum = x + y;             return sum;         }         static double um(double x, double y) ...

To find sum of number using For loop in C#

Image
To find the sum of a number using For loop in C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MYPROJECT.startup {     class Startupday1     {         static void Main()         {             Console.Write("enter number");             int n = int.Parse(Console.ReadLine());             int sum = 0;             int rem;                         for(n=n;n>0;n=n/10)             {                 rem = n % 10;                 sum = sum + rem;                 }          ...

To count number of digit in C# using while Loop

Image
To count number of digit in C# using while Loop using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MYPROJECT.startup {     class Startupday1     {         static void Main()         {             Console.Write("enter number");             int n = int.Parse(Console.ReadLine());             int count = 0;             while (n > 0)             {                 n = n / 10;                 count++;                              }                         Console.Wr...

BCA vs BTECH

Image
Bachelor of Computer Applications (BCA) is a three-year undergraduate degree course in the field of computer applications/computer science. After BCA the students can do further studies as MCA master in computer application. It is a common degree for CS/IT in Indian universities and is an alternative to the engineering counterpart, BE/BTech in Computer Science and Engineering/IT which takes 4 years. It is a technical degree that prepares students for a career in the field of computer applications and software development                                                     This is in contrast to a  Bachelor of Science in Information Technology  which is a  bachelor's degree  typically conferred after a period of four years of an undergraduate course of study in  Information Technology  (IT).  AFTER 12TH. ...

Programme to find divisible sum pairs in array.

Image
                                                        #include<stdio.h> int main() {     int arr[100],i,j,n,count=0,a;                          Programme to find divisible sum pairs in the array.                             #include<stdio.h> int main() {     int arr[100],i,j,n,count=0,a;     printf("enter number you want to enter in array and the divisor");  /* Lets enter 6 and 3 */       scanf("%d %d",&n,&a);     printf("enter elements ") ;     /* lets enter  1                                       ...