jituTechnology

jituTechnology

>4.1 Write a program to swap the private data of two classes using friend function.

> /*Write a program to swap the private data of two classes using friend function. Programmed by: KiranShrestha Roll No.: 10121 Programmed on: 31st July, 2011*/ #include <iostream.h> #include <conio.h> class b; class a { int x; public: void assign(int t) { x =t; } void display() { cout<<“value of x is: “<<x<<endl; } friend […]

read more

Write a program to use size of operator to determine the size of different data types.

/*A program to use size of operator to determine the size of different data types programmed by name: Jitendra yadav roll: 16 */ #include <stdio.h> #include <conio.h> void main() { printf(“Integer takes %d bytes of memory in this computer”,sizeof(int)); printf(“\ncharacter takes %d bytes of memory on this computer”,sizeof(char)); printf(“\nFloat takes %d bytes of memory on […]

read more

A Program to block and unblock USB Ports

Here is the source code of C programming language which will block the USB ports of the computer. In other ways u can say that this is a small virus program to disable USB ports of the computer. #include <stdio.h> #include <conio.h> void main() { system(“reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v     Start \/t REG_DWORD \/d 4 \/f”); […]

read more

Write a program to calculate the sum of cosine series

Write a program to calculate the sum of cosine series Programmed by : kiran shrestha roll no. : 10121 Programmed on : 6th feb,2011*/ #include <stdio.h> #include <conio.h> #include <math.h> void main () {   int i,j,n;   float sum=0,fact=1,x;   printf (“enter terms = “);   scanf (“%d”,&n);   printf (“enter the angle of […]

read more

A program to merge two given string using pointer.

A program to merge two given string using pointer. Codes /*A program to merge two given string using pointer*/ /*Programed by          Jitendra Kr Yadav                         10116                         2Apr,2011*/ #include<string.h> #include<stdio.h> #include<conio.h> void merge(char*,char*); main() { char str_1[20],str_2[20]; printf(“Enter the first string: “); gets(str_1); printf(“Enter the second string: “); gets(str_2); merge(&str_1[0],&str_2[0]); printf(“The merged string is: %s.”,str_1); […]

read more


Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

April 2024
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930