Posts

Showing posts from September, 2015

what is i,j in loop and a[0],a[1] in c programing

Image
here the size of array is 5 as it starts from zero here i & j represents the position of the element in the array i.e i represent 0 th position  and j represent 3 rd position and a[0]=7 i.e the element(value inside the array) in the array as a[1]=9.

c program for bubble sort using functions

#include<stdio.h> void bubble_sort(int a[],int num); void display(int a[],int num); int main() { int a[100],num,i; printf("\nEnter the size of array\n"); scanf("%d",&num); printf("\nEnter the elements one by one in array\n"); for(i=0;i<num;i++) scanf("%d",&a[i]); bubble_sort(a,num); display(a,num); return 0; } void bubble_sort(int a[],int num) { int i,temp,j; printf("\nUnsorted data:"); for(i=0;i<num;i++) printf("%d\n",a[i]); { for(i=0;i<num;i++) { for(j=0;j<num-1;j++) { if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } }} void display(int a[],int num) { int i; printf("sorted elements are:"); for(i=0;i<num;i++) printf("%d\t",a[i]); }

10 Best Brain excersise or Training Apps

Elevate (Android, iOS) (Free, Premium Subscriptions)   Many people spend a great deal of time in the gym working on our bodies, but can we say the same about our minds? Just like a healthy physical form, a healthy mind also needs to flex its mental muscles and get some exercise. In fact, there are studies that show playing puzzle games can help increase mental agility. Brain training apps combine the latest in brain science with puzzles and mind games in order to exercise your faculties. Check out 10 of the best brain training apps on Android and iOS devices below. Lumosity Lumosity is one of the heavy hitters in the brain fitness department, and it has an impressive amount of tools to match its claims about sharpening your gray matter. You can sign on each day for a series of games that train your memory and attention. First there’s an inventory exercise, which taxes your mind with a series of skills like remembering shapes and disappearing cards. Once the ap

Reliance dissconect soution

  Based On Twitter-Whatsapp-Facebook Proxy use three different proxy means before reaching 400 MB change proxy to all this whatsapp.com facebook.com twitter.com you can use them with proxifier creating as proxy chains

c program to add two integers by passing arguments to function using pointers

#include<stdio.h> void sum(int *a,int *b,int *t);//fn declaration int main() { int num1,num2,total; printf("\n Enter first number"); scanf("%d",&num1); printf("Enter the second number"); scanf("%d",&num2); sum( &num1,&num2,&total);//fn calling printf("\n the sum total is %d",total); return 0; } //fn definition void sum(int *a,int *b,int *t) // fn { *t=*a+*b; }

hello world program using pointer

#include<stdio.h> int main() { char *ch = "Hello world"; printf("\n %s",ch); return 0; } output:Hello world

c program to determine the memory location of a variable using pointer

As you know pointer contains the memory location of another variable her in the source code given below num is variable and *pnum is pointer storing the variable of num source code: #include<stdio.h> int main() { int num,*pnum; pnum=&num; printf("Enter the number "); scanf("%d",&num); printf("\n The number that was entered is %d",num); printf("\n the address of memory location is %u"); return 0; } output: Enter the number 10  The number that was entered is 10  the address of memory location is 2147483612 %p string prints the argument as a memory address in hexadecimal form .%u will print in decimal.

program to find the size of various data types on your system

#include<stdio.h> int main() { printf("\n The size of short integer is :%d",sizeof(short int)); printf("\n The size of unsigned integer is :%d",sizeof(unsigned int)); printf("\n The size of signed integer is:%d",sizeof(signed int)); printf("\n The size of integer is:%d",sizeof(int)); printf("\n The size of long integer is:%d",sizeof(long int)); printf("\n The size of character is:%d",sizeof(char)); printf("\n The size of unsigned character is:%d",sizeof(unsigned char)); printf("\n The size of signed integer is:%d",sizeof(signed char)); printf("\n The size of floating point is :%d",sizeof(float)); printf("\n The size of double number is :%d",sizeof(double)); return 0; }

create bootable Live USB drives for Ubuntu and other Linux

UNetbootin allows you to create bootable Live USB drives for Ubuntu and other Linux distributions without burning a CD. http://unetbootin.github.io/ go here for downloading the software and instructions

How Linux is Built

Image

How to Change the Folder Color in Ubuntu

Install Folder Color Nautilus Tool in Ubuntu Run the following commands in Terminal to install Folder Color Nautilus Tool in Ubuntu and Derivatives: $ sudo add-apt-repository ppa:costales/folder-color $ sudo apt-get update $ sudo apt-get install folder-color $ nautilus -q Install Folder Color Nautilus Tool for Nemo You can also install the Folder Color Nautilus Tool for Nemo to use on Linux Mint with Cinnamon. To install Folder Color for Nemo, run the following commands: sudo add-apt-repository ppa:costales/folder-color sudo apt-get update sudo apt-get install python-nemo libgtk2.0-bin folder-color-nemo You can also install the Folder Color using the deb file. You can download the .deb file: Ubuntu 15.04+ Installer Ubuntu MATE 15.04+ Installer Once you have installed the Folder Color, you will need to log out and back.

how to get root permissions in the filesystem in ubuntu 14.04 - in order to make root changes visually

open terminal type command sudo nautilus press enter and  type the password press enter file manager will open with root access have a nice day.

What is the command to delete a directory that has files in it? ubuntu

rm - r directory or rm - rf directory an explanation can easily be retrieved with man rm , here is an extract: - r , - R , -- recursive remove directories and their contents recursively - f , -- force ignore nonexistent files and arguments , never prompt also from man rmdir : rmdir Remove directory , this command will only work if the folders are empty .   use sudo before command if it displays permissions denied.

how to change DNS in ubuntu

Image
Search ' Network Connection' Open it Then select either WiFi or Ethernet, or whatever you are using, and click on edit. You'll get this: Select ipv4 in tabs Select addresses only in method Enter your DNS name below, and save it You're done

How does two nested for loop works

Image
row=1, then condition will be checked, if condition is true it will enter the block 2ndly, if the condition is true control moves to the inner for loop where col=1 and again condition will be checked, if condition true it will be entered inside and value of row will be printed then col value will be incremented col++ and again condition will be checked if it false the control again moves to upper for loop and incremented value of the row, row++ and step moves till the upper condition get false.

C program to impement circular queue using array

#include<stdio.h> //#include<conio.h> #define MAX 5 void insert(int); void delete(); void display(); int queue[MAX]; int front=-1,rear=-1; void insert(int num) { if((front==0 && rear==MAX-1)|| (front==rear-1)) printf("\n\n Queue is full"); else if(front==-1) { rear=0; front=0; } else if(rear==MAX-1) rear=0; else rear++; queue[rear]=num; } void delete() { int num; if (front==-1) printf("\n\n Queue is empty\n"); else { num=queue[front]; if(front==rear) { front=-1; rear=-1; } else if(front==MAX-1) front=0; front++; printf("\n\n item deleted %d",num); } } void display() { int i; if((front==-1)||(front==rear+1)) printf("\n\n Queue is empty\n"); else { printf("\n The front and rear %d %d",front,rear); printf("\n The Queue is"); for(i=front;i<=rear;i++) printf("\t %d",queue[i]); } } int main() { int ch,num; printf("\n main menu"

C Program to implement Selection sort using functions

Levels of difficulty: Hard / perform operation: Sorting Write a C program to sort given N elements using SELECTION sort method using functions : a) To find maximum of elements b) To swap two elements Selection sort is comparison based sorting technique, It finds the minimum value in list and swaps that value to the first position and so on. Selection sort is inefficient on larger data. source code :#include<stdio.h> void selection_sort(int a[],int num); void display(int a[],int num); int main() { int num,i,a[100]; printf("\nEnter the size of the array\n"); scanf("%d",&num); printf("\n Enter the elements one by one\n"); for(i=0;i<num;i++) { scanf("%d",&a[i]); } selection_sort(a,num); display(a,num); return 0; } void selection_sort(int a[],int n) { int i,j,t,m; for(i=0;i<n-1;i++) { m=i; for(j=i+1;j<n;j++)  {  if(a[j]<a[m])                                                        

For learning c and c++ programming

To learn c and c++ programming these youtube channels are best Engineering mentor Think aloud academy mycodeschool vikas chandra pandey for source codes http://scanftree.com/programs/c/c-program-to-implement-selection-sort/ http://www.sanfoundry.com/c-program-implement-selection-sort-method-using-functions/

How to establish a 3g mobile broadband autoconnection/ reconnection on Linux

Image
TRY SOLUTION 3: IT IS WORKING PERFECTLY   Solution 1: 1- create a shell script as follows (Replace "Tunisie Télécom / TUNTEL WEB DATA" with the name of your Mobile Broadband connection):   #!/bin/bash while true; do     LC_ALL=C nmcli -t -f TYPE,STATE dev | grep -q "^gsm:disconnected$"     if [ $? -eq 0 ]; then         #jdownloader is still in the download status so stop it because         #internet is disconnected and jdownloader won't resume download         #when connected again         #jdownloader --stop-download         #sometimes I can not get connected after disconnection when         #I click on . I have to disable         #and enable Mobile Broadband         nmcli -t nm wwan off         sleep 1         nmcli -t nm wwan on         sleep 1         nmcli -t con up id " YourMobileBroadbandConnectionNameHere "         #wait approximately 15 sec to get connected         #if anyone

WAP to insert 5 elements in an array & search an elements taken as input by the user & print the result if it is found OR linear search

#include<stdio.h> #include<conio.h> int main() { int i; int num; int array[5]; int count=0;     printf("\n Enter the data to be entered in array \n");     for(i=0;i<5;i++)     {     scanf("%d",&array[i]); }             printf("\n Enter the data to be searched \n");         scanf("%d",&num);         for(i=0;i<5;i++)         {             if(num==array[i])             {             count =1;             break;         }                 else         {             count=0;         }             }     if(count==1)     {         printf("\n Data found");     }     else             if (count ==0)     {         printf("\n Data not found");     }     getch();     return 0; }

how to download youtube videos and full youtube playlist

Just visit her and install the extension for that  savefrom.net To download the whole playlist go here    http://youtubemultidownloader.com/list.php

Mobile broadband (Modem) not working in ubuntu Linux

Image
1.1 eject CD-ROM Plug in the dongle, it will show auto-created CD-ROM. Right click on the CD-ROM, Select “Eject” item to close “CD-ROM” mode 1.2 Configuration Open the terminal firstly (The path of terminal is Applications->Accessories->Terminal) Let OS known the DataCard device, please input the following command: sudo modprobe usbserial vendor=0x12d1 product=0x1506 here 0x will be fixed only 12d1 and 1506 will change according with your usb device [Note:] if you reboot your PC, you should enter same command again. type lsusb in terminal here 12d1 is vendor id 1506 is product id so replace it with your modem id to do so open terminal and type   https://drive.google.com/file/d/0ByMLIu9tcOdOX3VLZzF2MEhDN1k/view?usp=sharing

Install FlareGet download manager 3.1 in Ubuntu 14.04

Here's how you can install FlareGet download manager 3.1 in Ubuntu 14.04. FlareGet can replace your browser's download manager. 1. Open a terminal window. 2. Type in the following commands then hit Enter after each. For 32-bit: wget -O flareget-32.deb http://drive.noobslab.com/data/apps/flareget/flareget_3.1-36_i386.deb sudo dpkg -i flareget-32.deb sudo apt-get -f install;rm flareget-32.deb For 64-bit: wget -O flareget-amd64.deb http://drive.noobslab.com/data/apps/flareget/flareget_3.1-36_amd64.deb sudo dpkg -i flareget-amd64.deb sudo apt-get -f install;rm flareget-amd64.deb You can also get FlareGet directly from the FlareGet downloads page .

how to install internet download manger in linux

Image
How to run any Version of Internet Download Manager in Ubuntu/Linux with full Firefox Integration.  I 'm gonna show you how to use latest version of IDM in any linu x OS , yes you heard it right "latest version of IDM". Till wine 1.7.4x, it only supported an older version of ID M whic h wa s IDM 5.05. It was functional but shitty version when we look a t newer ve rsions of IDM with a dded new features . S o just follow t h is step by step g uide to get your IDM working. So I have divided this Post in 3 parts: Installing "Internet Download Manager" Integrating IDM with Firefox. Make IDM look Good.          Installing "Internet Download Manager" As you know IDM is a window's application. So to run IDM on linux we need something that supports Windows apps in linux. Wine (Wine is not an emulator) is a free and open source compatibility layer software application that aims to allow applications designed for Microsoft Windows to run

No free MBR partition error

Image
you can use any partion wizard manager like easeus free partion wizard manager also. No free MBR slot " may emerge in the following two scenarios:   Scenario one: There are four primary partitions on the disk as the screenshot shows below.  To resolve this problem, we need to convert one of the primary partitions adjacent to the unallocated to logical partition. It is simple to convert primary partition to logical partition with Partition Wizard.  Select the primary partition to be converted to logical partition and then employ the " Set Partition as Logical " to finish conversion.   Create " operation. Scenario two: There have already been three primary partitions plus one or more neighboring logical partitions. Besides, the unallocated space for creating partition is not adjacent to logical partition as the screenshot shows below. To resolve this problem, we need to convert the primary partition between unallocated space and l