Programming Tools

where students meet to knowledge

Category

Programming Languages

C Programming History

C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number… Continue Reading →

C Programming Strings

In C programming, array of characters is called a string. A string is terminated by a null character /0. For example: “c string tutorial” Here, “c string tutorial” is a string. When, compiler encounter strings, it appends a null character /0 at the… Continue Reading →

How to pass arrays to a function in C Programming?

Passing One-dimensional Array In Function Single element of an array can be passed in similar manner as passing variable to a function. #include <stdio.h> void display(int age) { printf(“%d”, age); } int main() { int ageArray[] = { 2, 3,… Continue Reading →

C Programming Multidimensional Arrays

In C programming, you can create an array of arrays known as multidimensional array. For example, float x[3][4]; Here, x is a two-dimensional (2d) array. The array can hold 12 elements. You can think the array as table with 3 row and each… Continue Reading →

C Program to Calculate Standard Deviation

#include <stdio.h> #include <math.h> float calculateSD(float data[]); int main() { int i; float data[10]; printf(“Enter 10 elements: “); for(i=0; i < 10; ++i) scanf(“%f”, &data[i]); printf(“\nStandard Deviation = %.6f”, calculateSD(data)); return 0; } float calculateSD(float data[]) { float sum =… Continue Reading →

C Program to Find Largest Element of an Array

#include <stdio.h> int main() { int i, n; float arr[100]; printf(“Enter total number of elements(1 to 100): “); scanf(“%d”, &n); printf(“\n”); // Stores number entered by the user for(i = 0; i < n; ++i) { printf(“Enter Number %d: “,… Continue Reading →

C Program to Calculate Average Using Arrays

#include <stdio.h> int main() { int n, i; float num[100], sum = 0.0, average; printf(“Enter the numbers of elements: “); scanf(“%d”, &n); while (n > 100 || n <= 0) { printf(“Error! number should in range of (1 to 100).\n”);… Continue Reading →

C Programming Arrays

An array is a collection of data that holds fixed number of values of same type. For example: if you want to store marks of 100 students, you can create an array for it. float marks[100]; The size and type… Continue Reading →

Java – Static Memebers

STATIC DATA MEMBERS Members of the class can be declared as static. When the instance variable(data member) is declared as static, it is essentially a global variable that exists independent of the objects of that class. All the objects of… Continue Reading →

Java – Object and Classes

CLASS Class specifiers the criteria to handle the problem. The entire set of data and methods associated with the problem can be bound together and implemented as a type with the help of class. In fact,Class is an abstraction of… Continue Reading →

Fibonacci series

#include<stdio.h> #include<math.h> void main() { int n,a,b; printf(“\nEnter the End term : “); scanf(“%d”,&n); printf(“\nFibonacci series : [ “); a=0; b=1; while(a<=n); { printf(“%d”,a); a=a+b; b=a-b; } printf(“]\n”); }

Check Number is Octal and Hexadecimal

#include<stdio.h> #include<math.h> void main() { int n; printf(“\nEnter a Number : “); scanf(“%d”,&n); printf(“\nOct Eqr : %o”,n); printf(“\nHex Eqr : %x”,n); }

© 2017 Programming Tools — acadinetech.com