Skip to main content

Posts

Showing posts from March, 2017

C Programming #4 (Decision Control Instruction)

Decision! While writing program when its is executed it execute in the sequence which it is written but in serious programming sequence is according to some condition so here is the need to make decision .Which is implemented in C using : The if statement The if-else statement The conditional operator The if statement: The general form of if statement looks like this: if(this condition is true) execute this statement; Example: #include<stdio.h> int main() { int num; printf("Enter a number less than 10"); scanf("%d",&num); if(num<10) printf("What an obedient servant you are!\n"); return 0; } The if-else statement: In this form when the if statement turn to be false then the else statement is executed Example: /*Calculation of gross salary*/ #include<stdio.h> int main() { float bs,gs,da,hra; printf("Enter basic salary"); scanf("%f",&bs); if(bs<1500)

Samsung Galaxy S8 and S8+ (Features)

Samsung has launched a great phone with improvements in all aspects one analyst have termed it as "smartphone innovation super cycle"  Samsung galaxy S8 Samsung galaxy S8+ The only difference in these two phones is it's screen size as you can see in the above picture. Some of the feature to notice about this phones are: Infinity Display : The galaxy S8 has 5.8 inch display crammed into what feels like normal phone with a barely-bezel It has a clean unbranded face, fluid looking display and a mirror like glass back. The only bad thing in display is its bizarre aspect ratio which might result in pillarboxed 16:9 videos. If you still want the actual phablet there is a version with 6.2 display  Force Touch : Samsung is not calling this feature as force touch like Apple but this similar feature is available into the bottom half of it which means if you click on virtual home button it will give you the haptic feedback in response. Thi

C Programming for Beginner #3 (Instructions)

Types of Instruction Type Declaration: It is used to declare type of variables used in C Program. Arithmetic: It is used to perform Arithmetic operation on constant or variable. Control: It is used to control the sequence of execution. With the help of these instruction we make our C Program. Type Declaration:- Example:  int a float b char code Explanation : int a means we are a can store an integer values in a like 1,2,3,4 etc. float b means we can store a decimal values in b like 1.5 ,2.6 etc. char is used to declare character in C Program. Arithmetic : c=a+b (Addition) c=a/b (Division) c=a*b (Multiplication) c=a%b (Modulus) these gives us the remainder after division. Control : This instruction comes in picture when we deal with the loops,case control sequence of program or decision making. Example Program: include<stdio.h> int main() { int a=5,b=5; c=a+b; d=a-b; e=a/b; f=a*b; g=a%b; printf(&qu

Android O (Android Operating system)

There are many kind of changes and improvements in this new version of Android OS. Increased Ability of the mobile:- aptX bluetooth streaming :-   High quality audio codec is supported for streaming to bluetooth Headsets and Speakers Adaptive icons give devs and OEMs easy shape masks, extra effects :-  "an OEM like Samsung or HTC will provide a unifying mask, which will allow developers to integrate almost any existing app icon into the broader user interface with minimal effort, and no extra graphics work on the icon itself." Neighborhood Aware Networking (NAN) mode for WiFi :-  "You can think about NAN as a combination of WiFi Direct and Nearby. Two hypothetical phones with NAN could find each other and connect without any additional apps or configuration, allowing them to share data at high speeds." Picture-in-picture video for all devices and new windowing features :- "The gist is that when watching video on Android O, you'll be able to shr

C Programming for Beginners #2 (First Program hello world)

This is the First C Program from which every programmer have started. #include<stdio.h> int main() { printf("Hello world\n"); return 0; } Explanation of the Program include is to add the specific library to compile the program. In this case stdio.h is the library in which commands are predefined it is called as preprocessor directive. printf is used when we have to display something on screen. In printf \n is used to print on the new line. After every end of command ; is used. To compile the C program there are many compilers available but if you ask me I compile and run my programs on ubuntu so in ubuntu the program is typed in text editor and saved it as .c file and in terminal it is compiled by two ways using gcc name.c and in place of name you have to enter the name of file you have saved. It will give the compiled program as a.out and you can run it by ./a.out command Note:- To give your program the name you want inste

C Programming for Beginners #1 (Getting started)

C Programming is easy to learn there is a close analogy between learning English language and learning C language. We will start from the basic concept of C like which alphabets,digits,special symbols we can use. Alphabets - A,B.......Y,Z Digits - 0,1,2,3,4,5,6,7,8,9 Special symbols - ~ ' ! @ # % ^ & * ( ) _ - + = | \ { } [ ] : ; " ` < > , . ? / $ In C Programming we typically do lots of calculation the result of these calculation is stored in the computer memory it's similar to human memory so all the result in C is in memory location For now just just keep in mind that in C there are two types of constant:- Primary constant Secondary constant Primary constant:- Integer constant Real constant Character constant Secondary constant:- Array Pointer Structure Union Enum.Etc I'll cover all this topic and using this we are going to learn C programming. C keywords :- C keyword are the word whose meaning are already d