Interfaces and Architectures

In the previous post We have discussed two parts of the world of Java, the development environment and the execution environment. The third part is where the world of Java meets the rest of the world, that is, the capabilities it provides for extending Java functions and integrating with applications of other types. The simplest … Read more

The Execution Environment

We have said that the JVM operates on the stream of bytecode as an interpreter. This means that it processes bytecode while the program is running and converts it to real machine code that it executes on the fly. You can think of a computer program as being like a railroad track, with the train … Read more

The Development Environment

Once you have installed the Java 2 SDK, you can start creating Java source code and compiling it. Java is like any other high-level programming language, in that you write the source code in an English-like form. The source code then has to be converted into a form that the machine can understand before it … Read more

Components of Java

There are a number of different components to Java: 1. Development environment The Java 2 SDK contains the tools and executable code needed to compile and test Java programs. However, unlike a normal language, the Java 2 SDK includes object frameworks for creating graphical user interfaces, for networking and for complex I/O. Normally, in other … Read more

C program to print digital clock with current time

#include <stdio.h> #include <time.h>   int main() {     time_t s, val = 1;     struct tm* current_time;        s = time(NULL);        current_time = localtime(&s);       printf(“%02d:%02d:%02d”,            current_time->tm_hour,            current_time->tm_min,            current_time->tm_sec);       return 0; }

Pointers in C Programming

A pointer is a variable that stores the address of another variable. Unlike other variables that hold values of a certain type, pointer holds the address of a variable. For example, an integer variable holds (or you can say stores) an integer value, however an integer pointer holds the address of a integer variable. In … Read more

Structure in C programming

Structure is a group of variables of different data types represented by a single name. Lets say we need to store the data of students like student name, age, address, id etc. One way of doing this would be creating a different variable for each attribute, however when you need to store the data of … Read more

Function call by reference in C Programming

Before we discuss function call by reference, lets understand the terminologies that we will use while explaining this: Actual parameters: The parameters that appear in function calls. Formal parameters: The parameters that appear in function declarations. For example: We have a function declaration like this: int sum(int a, int b); The a and b parameters … Read more

Functions in C Programming

A function is a block of statements that performs a specific task. Suppose you are building an application in C language and in one of your program, you need to perform a same task more than once. In such case you have two options – a) Use the same set of statements every time you … Read more

Strings and String functions in c

String is an array of characters. In this post, we learn how to declare strings, how to work with strings in C programming and how to use the pre-defined string handling functions. We will see how to compare two strings, concatenate strings, copy one string to another & perform various string manipulation operations. We can … Read more