Skip to content

Category Archives: C# Programs

Given a file, now our task is to copy data from one file to another file using C#. So to do this task we use… Read More
Given a sorted array and a value x, the ceiling of x is the smallest element in array greater than or equal to x, and… Read More
Question: Write a function to find if a given integer x appears more than n/2 times in a sorted array of n integers. Basically, we need… Read More
Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. Example :  Input : arr[] = [1, 2, 3, 4, 5,… Read More
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.   Rotation of the above array by 2 will make array … Read More
Write a program to print all the LEADERS in the array. An element is leader if it is greater than all the elements to its… Read More
Bit Rotation: A rotation (or circular shift) is an operation similar to shift except that the bits that fall off at one end are put… Read More
Given an binary string as input, we need to write a program to convert the binary string into equivalent integer. To convert an binary string… Read More
Inner conditional operator can be used in any block,it shows like (a>b)?((a>c)?a:c):(b>c?b:c). Here we input three numbers and finding the largest number using nested conditional… Read More
Given an hexadecimal number as input, we need to write a program to convert the given hexadecimal number into equivalent integer. To convert an hexadecimal… Read More
C# Program to print weekday name from a given weekday number (0-6). A switch statement allows checking a value with a list of values or… Read More
Given an octal number as input, we need to write a program to convert the given octal number into equivalent integer. To convert an octal… Read More
As in other programming languages, various types of constants are defined the same as defined in C#, we can also define various types of constants… Read More
\ is a special character (sign) In C#. It is used for escape sequences(break out) such as to print a new line – we use… Read More
There are various method to print a new line within the message By using: \n – It prints new line. By using: \x0A or \xA… Read More

Start Your Coding Journey Now!