Wednesday, October 21, 2015

C program for converting a number to any base between 2 to 16.

     Hello friends, today I'm going to give you a program that will convert any inputted number from decimal to any specified base between 2 to 16, including the -ve numbers.

     So the first question is how to convert a number in base 10 to a specified base. The answer is rather simple. Just keep dividing the number with the new base and record the remainder each time until the quotient becomes not divisible by the base. When this happens, rearrange the remainders recorded earlier in reverse order to get the converted number. Here is an example:

Saturday, October 17, 2015

Hello friends, 


You openly share your BCA/MCA course related problem like a related with programming or related with any latest technology updates. 

We will try to reply or solve your problems as soon as possible. 


And if you like to directly share with us so you can email your problems.

Wednesday, October 07, 2015

C program for sorting contents of a binary file.

 Hello everyone, here is the program for sorting tha contents of a binary file containing records of various employees in ascending order according to name.

#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
typedef struct emp

Saturday, October 03, 2015

Java applet program to create a marquee with custom user defined text and number of counts.

      Hi there, Today I'm going to show you all how to make an applet that will generate a marquee using a custom user defined text and number of counts that it should run. For this I have used Java Applet class and awt controls and a thread to simulate marquee over applet. Following is the code for the Java Applet....

Marquee.java


import java.awt.*;

import java.awt.event.*;

import java.applet.*;

/*<applet code="Marquee.class" width=800 height=300></applet>*/
public class Marquee extends Applet implements ActionListener,ItemListener,Runnable{
int num;
int x,y;

Monday, September 21, 2015

(IGNOU MCA 031 SOLVED Q.2)Write a program for the arithmetic negation of an integer, addition, subtraction and multiplication of two integers using 3’s complement representation.

Suppose that instead of binary or decimal representation of integers, we have ternary, along with 3’s complement, representation of integers, i.e., integers are represented using three digits, viz., 0, 1,2. For example, the integer 47 is represented as 01202  =  (in decimal)    1. 33 + 2. 32 + 0. 31 + 2. 30, where, the leading zero indicates positive sign.  And the integer (- 47 ) in 3’s complement is represented by   11021, the leading 1 indicates negative sign. The other digits, except the right-most, in the representation of (−   47) are obtained by subtracting from 2 the corresponding digit in 47’s representation, and then adding 1 (the representation of – 47 is obtained as 11020 + 00001).