Archive for the ‘Programming Languages’ Category

  • Database program for use with C language

    Database program for use with C language
    Which free database programs can be used that will accept input from a program written in C?
    Answer: It is possible to interface quite a few different databases with the correct libraries in C.

    For example, Microsoft’s Visual C++ allows binding to Microsoft’s JET engine (used by Access), SQL and a [...]

  • Declarations in ctype.h

    The header ctype.h in the ANSI C Standard Library for the C programming language contains declarations for character classification functions. The header file contains declaration for several functions to perform testing and character conversion.

    isalnum
    —-
    test for any character for which isalpha or isdigit is true

    isalpha
    —-
    test for alphabetic character

    iscntrl
    —-
    test for control character

    isdigit
    —-
    test for numeric digit

    islower
    —-
    test for lower [...]

  • C Program to Generate Prime Numbers

    Here is a C program that outputs prime numbers from 1 to 100
    #include <math.h>
    #include <stdio.h>
    int main(void)
    {
    int i, j, isPrime;
    for(i = 2 ; i <= 100 ; i++)
    {
    isPrime = 1;
    for(j = 2 ; j <= i ; j++)
    {
    if( i == j)
    continue;
    else if( i % j == 0)
    isPrime = 0;
    }
    if(isPrime)
    printf(“%d, “, i);
    }
    printf(“\n”);
    return 0;
    }

  • Hashing in C Language

    Question. What is meant by hashing in C language?
    Answer.
    Hashing is the transformation of a string of characters into a usually shorter fixed-length value or key that represents the original string. Hashing is used to index and retrieve items in a database because it is faster to find the item using the shorter hashed key than [...]

  • Difference between Arrays and Pointers

    What is the difference between Arrays and Pointers?
    Answer.
    Arrays use subscripted variables to access and manipulate data. Array variables can be equivalently written using pointer expression.
    Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by them.

  • Your First Program in Java

    Just as we humans use different languages to interact with each other, similarly, computers have their own languages through which we can communicate with them. These languages are broadly of two types: High Level and Low Level Languages.
    One very popular High Level language is Java, which can be used to write efficient programs for the [...]

  • How to Learn to Program in C

    C is a powerful language that was developed in the 70s. Learning programming in C can take time. However, if you have experience with other languages you will be able to learn faster. Learning a programming language makes learning languages easier. While learning the entire C language is beyond the scope of this article, it [...]

  • Some facts about C

    Learning a language is not all about learning the keywords and functions. It is more about learning about the history and philosophy surrounding its conception. Only then can one become a true programmer and a true scholar.
    History and traditions are what make us what we are.
    So…here are some facts about C language:

    C was developed by [...]