Skip to main content

Posts

Showing posts from October, 2013
Write a c program or code to subtract two numbers without using subtraction operator #include <stdio.h> int main(){         int a,b;     int sum;     printf( "Enter any two integers: " );     scanf( "%d%d" ,&a,&b);     sum = a + ~b + 1;     printf( "Difference of two integers: %d" ,sum);     return 0; } Sample Output: Enter any two integers: 5 4 Difference of two integers: 1
How to calculate power of a number in c How to write power in c #include <stdio.h> int main(){   int pow,num,i=1;   long int sum=1;   printf( "\nEnter a number: " );   scanf( "%d" ,&num);   printf( "\nEnter power: " );   scanf( "%d" ,&pow);   while (i<=pow){             sum=sum*num;             i++;   }   printf( "\n%d to the power %d is: %ld" ,num,pow,sum);   return 0; }  output: Enter the number: 5 Enter the  Power:6   5 to the power 6 is :  15625  
Extract digits from integer in c language #include <stdio.h> int main(){   int num,temp,factor=1;   printf( "Enter a number: " );   scanf( "%d" ,&num);   temp=num;   while (temp){       temp=temp/10;       factor = factor*10;   }   printf( "Each digits of given number are: " );   while (factor>1){       factor = factor/10;       printf( "%d " ,num/factor);       num = num % factor;   }   return 0; } Sample output: Enter a number: 123 Each digits of given number are: 1 2 3
Add two numbers in c without using operator How to add two numbers without using the plus operator in c #include <stdio.h> int main(){         int a,b;     int sum;     printf( "Enter any two integers: " );     scanf( "%d%d" ,&a,&b);     //sum = a - (-b);     sum = a - ~b -1;     printf( "Sum of two integers: %d" ,sum);     return 0; } Sample output: Enter any two integers: 5 10 Sum of two integers: 15 Algorithm: In c ~ is 1's complement operator. This is equivalent to:   ~a = -b + 1 So, a - ~b -1 = a-(-b + 1) + 1 = a + b – 1 + 1 = a + b

List of magazines in India

Below is a list of magazines published in India . Steel 360 Indian Steel Price Magazine - Monthly VERVE India's Premier Luxury and Lifestyle International Monthly Magazine Tiles of India Lifestyle Magazine - Bi Monthly LegalEra Legal affair Magazine - Monthly Tehelka News Weekly Industry 2.0 Manufacturing Technology Updates and News Monthly The Business Enterprise Business Monthly The Week Chill Maadi Student Magazine Frontline Electronics For You Technology Monthly CTO Forum - Monthly Yo Vizag Lifestyle Monthly DSA Media Puthiya Thalaimurai - A Weekly Tamil Magazine Shair Urdu Magazine Business Circle magazine Desh magazine Rythubandhu Sportstar Outlook India Today Femina (India) PCQuest Creative Gaga - Bi-monthly Creative Design Magazine Dataquest - Fortnightly Information Technology Sanctuary Asia Himal SustaiNuance - Monthly - Corporate Sustainability magazine Hindi Madhu...

How do I change the way users log on or off with Windows

How to? Just follow the steps below: 1. Press window  + R , 2. Type “control userpasswords2” and click OK . 3. Navigate to the Advanced tab. 4. Check the “Require users to press Ctrl+Alt+Delete” and click OK . 5. That’s it. (Of course logoff to try out.) . Security tip: Something that can make your PC much more secure is this. Update the Windows® Account Database, and then you’ll be required to enter a password before the Windows® Login appears. What does the “Require users to press Ctrl+Alt+Delete” do? The main advantage of using secure logon is that other programs such as password software cannot intercept your user name and password as you enter them for login. Therefore, using secure logon provides an additional layer of security for your computer. I hope you find this information useful and if you need any further assistance, please feel free to contact me and let me know. I hope this information was helpful… Have a nice day…   ...