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<stdio.h> | |
#include<stdlib.h> | |
#define SIZE(n) (n+8-(n%8))/8 | |
#define PRESENT 1 | |
#define ABSENT 0 | |
#define POS(n) n/8 | |
struct number | |
{ | |
unsigned char num0:1; | |
unsigned char num1:1; |
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
void password() | |
{ | |
ifstream i; | |
float pd; | |
i.open("K:\\pd"); //my pendrive | |
i.read((char*)&pd,sizeof pd); | |
i.close(); | |
int flag; | |
flag=pd/66; //the decryption of password | |
flag=flag+523; |
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<msp430.h> | |
void init_adc() | |
{ | |
ADC10CTL0|=ADC10ON|SREF_0|ADC10SHT_2; | |
ADC10CTL1|=INCH_4|SHS_0|ADC10DIV_0|ADC10SSEL_0|CONSEQ_0; | |
ADC10AE0=BIT4; | |
ADC10CTL0|=ENC; | |
} | |
void start() |
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<stdio.h> | |
#include<iostream> | |
using namespace std; | |
main() | |
{ | |
int *b,a; | |
void *v; | |
a=1; | |
b=&a; | |
v=&a; |
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
clear | |
g++ function.cpp | |
clear | |
./a.out | |
g++ temp.cpp | |
clear | |
./a.out |
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
#!/bin/bash | |
#Author :Rajeev S | |
#Date :8/18/2011 2341hrs | |
#print mac id of a computer | |
import re | |
import os | |
os.system("clear") | |
ifconfigOutput=os.popen("ifconfig").read() | |
t='[a-z0-9]' | |
MACpattern=(t*2+':')*5+t*2 |
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<stdio.h> | |
#include<string.h> | |
#include<iostream.h> | |
#include<process.h> | |
#include<conio.h> | |
void search(int n); | |
void print(char temp[50],int i,int n); | |
char str[50][50]; | |
int main() | |
{ |
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> | |
#include<fstream> | |
#include<stdio.h> | |
using namespace std; | |
int main() | |
{ | |
char exp[50],x[10]; | |
cout<<"\nEnter the function "; | |
gets(exp); | |
cout<<"\nEnter the value of x "; |
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<stdio.h> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
float res,x=19; | |
res=(x*x)+(18*x)+93; | |
cout<<res<<endl; | |
} |
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<fstream.h> | |
#include<stdlib.h> | |
int main() | |
{ | |
cout<<"\nPassword generator "; |