This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
int main(){ | |
int x=1,y=2; | |
cout<<"x :=:"<<x<<"\ny :=:"<<y<<"\n"; | |
x+=y; | |
y=x-y; | |
x-=y; | |
cout<<"\nx :=:"<<x<<"\ny :=:"<<y<<"\n"; | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
void main(){ | |
switch(printf("HELLO WORLD")){} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Note : This is a Bug Code ,, in actual it is NOT POSSIBLE !! , this code will only work On MS Visual 2008 & 2010*/ | |
//Sol#1 | |
#include<stdio.h> | |
int main(){ | |
int i=10; | |
int *ptr=&i; | |
*ptr=(int *)20; | |
printf("%d",i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Note : Program can take input from binary File*/ | |
#include <iostream> | |
#include <fstream> | |
#include <conio.h> | |
#include <stdio.h> | |
using namespace std; | |
int main(){ // jUST fOR fUN Zulqurnain jutt Here | |
long int n,m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
#include <fstream.h> | |
int main() | |
{ | |
ofstream fout; | |
int i; char ch; | |
// File opening in output mode both | |
fout.open("d:/test.txt",ios::in); | |
if(!fout) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
#include <stdlib.h> | |
int main(){ // By Zulqurnain jutt | |
int n; | |
char c[100]; | |
cout<<"Enter Your Number :=:"; cin>>c; | |
for(int it=0,Fail=0,Pass=0;c[it]!='\0';it++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
int main(){ | |
int Deci,i=0; | |
int THex[100]; // Reason To Use : We Need A,B,C,D,E character To Represent Value of HEX | |
char Hex[100]; // Stores HEX | |
cout<<"Enter Decimal Number :=:"; cin>>Deci; | |
int Current_r=Deci , Current_q=Deci; | |
while(Current_q>=16){ // getting all remainders in array Reversed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
int main(){ // Simple Prime Checker | |
int n; | |
cout<<"Enter Your Number :=:"; cin>>n; | |
/*Logic is simple ! if a number is divisible by more than 2 times ,, when approaching it from 1 to n then | |
its not prime else it is prime . | |
*/ | |
int t=1,i=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
#inlcude <math.h> | |
int main(){ // Done By Zulqurnain jutt | |
double Numerator , Denominator , Result; | |
cout<<"Enter Numerator :=:"; cin>>Numerator; | |
cout<<"Enter Denominator :=:"; cin>>Denominator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
#include <string.h> | |
class student | |
{ | |
char *arr[5]; | |
public: | |
void setarr() | |
{ |
OlderNewer