# Visual Basic Programming Code Examples

## Visual Basic > Applications VBA Code Examples

C Find the Sum of First n Natural Numbers -
We will see 2 C programs to calculate the sum of natural numbers. In the first C program we are using For Loop for find the sum and in the second program we are doing the same using

Finds out the Roots of Quadratic Equation -
C Program calculates the roots of a quadratic equation. First it finds Discriminant using the Formula: Disc = 'y*y-4*x*z'. There are 3 types of roots. They are complex, distinct and equal

C Sort Structures on the basis of Structure -
Using cricket, declare an array player with 10 elements and write C program code read the information about all the 10 players and print a team wise list containing Names of Players

Read and write Strings Printf() and Scanf() -
Compare 2 strings, 'Concatenate Strings' and copy one string to another & perform various 'string manipulation operations'. We perform such operations using 'pre-defined' functions

C Convert Binary to Octal Number System -
In C program user is asked to enter the binary number and the program then converts that binary number to the octal number by calling a user defined function. To understand this...

Generate All Subsets of a Given Set in the -
Print all combination of a given length from the given array. Return if the currLen is more than the "required length". If currLen is equal to required length then "Print the sequence".

Convert Binary to Hexadecimal in the C++ -
To convert binary to hexadecimal in C++, you have to ask to the user to "enter any number" in binary to convert it into hexadecimal, then display the equivalent hexadecimal value on

C Code interchange Diagonals of a Matrix -
C programming code to read elements in a matrix and interchange elements of primary (major) diagonal with secondary (minor) diagonal. C program code for interchanging