Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

C program to find the length of a string without using strlen

Suryateja Pericherla Categories: Strings. No Comments on C program to find the length of a string without using strlen

In this article we will learn to implement a C program to find the length of a string without using strlen. A C program is provided below to find length of a string without using predefined function.   Program is as follows: #include<stdio.h> int main() { char str[20]; printf("Enter a string: "); scanf("%s", str); int […]

Read the rest of this entry »

C program to reverse an array in place using pointers

Suryateja Pericherla Categories: Pointers. No Comments on C program to reverse an array in place using pointers

In this article we will learn to implement a C program to reverse an array in place using pointers. A C program is provided below to reverse the given array in place using pointers. Program is as follows: #include<stdio.h> void reversearray(int *p, int n) { int *first = p; int *last = p+n-1; while(first<last) { […]

Read the rest of this entry »

C program to reverse an array in place

Suryateja Pericherla Categories: Arrays. No Comments on C program to reverse an array in place

In this article we will learn to implement a C program to reverse an array in place (without using a temporary array. A C program is provided below to reverse an array in place. Program is as follows: #include<stdio.h> int main() { int array[20]; int n; printf("Enter number of elements: "); scanf("%d", &n); printf("Enter array […]

Read the rest of this entry »

C program to print prime numbers using Sieve of Eratosthenes

Suryateja Pericherla Categories: Others. 1 Comment on C program to print prime numbers using Sieve of Eratosthenes

This is a C program to print prime numbers using Sieve of Eratosthenes, which is said to be the most efficient algorithm for generating prime numbers.   The program is as follows: #include<stdio.h> int main() { int n; printf("Enter n value: "); scanf("%d", &n); int prime[n+1]; //Loading the array with numbers from 1 to n […]

Read the rest of this entry »

Displaying xUbuntu in fullscreen using VMWare

Suryateja Pericherla Categories: Linux. No Comments on Displaying xUbuntu in fullscreen using VMWare

This article contains instructions on displaying xUbuntu in fullscreen using VMWare.   Heard about xUbuntu from colleagues and decided to try it. Downloaded the ISO file and installed it using VMWare. The user interface of xUbuntu is very simple and pleasing.   But I noticed that even when VMWare is in full screen mode, the […]

Read the rest of this entry »

Applet program to handle mouse events

Suryateja Pericherla Categories: Applets. No Comments on Applet program to handle mouse events

In this article we will learn to implement an Applet program to handle mouse events. A Java applet program is provided below to handle various mouse events.   Program is as follows: import java.applet.*; import java.awt.*; import java.awt.event.*; public class MouseApplet extends Applet implements MouseListener { String msg="Initial Message"; public void init() { addMouseListener(this); } […]

Read the rest of this entry »

Applet program to draw lines, ovals, and rectangles

Suryateja Pericherla Categories: Applets. 2 Comments on Applet program to draw lines, ovals, and rectangles

In this article we will implement an Applet program to draw a line, oval and rectangle. An Applet program is provided below to draw lines, ovals, and rectangles.   import java.applet.*; import java.awt.*; public class GApplet extends Applet { public void paint(Graphics g) { g.drawLine(20, 20, 500, 20); g.drawRect(20, 40, 200, 40); g.fillRect(300, 40, 200, […]

Read the rest of this entry »
Blogarama - Blog Directory