EmbLogic's Blog

Author Archives: Prachi Chhabra

Select Function in Socket.

Select function helps you to know  about the file descriptors which are ready for reading , writing. Basically when there is no data present in the socket during recv call it gets blocked till the data arrives so that meanwhile … Continue reading

Posted in Uncategorized | Leave a comment

How to read space by scanf in c?

rvrs_of_string Generally scanf() ignores the spaces,backslash n,tabs etc while taking input from the user, but by using scanset specifiers we are able to deal with this problem. scanset specifiers are represented by %[]. whether we want to right a character … Continue reading

Posted in Uncategorized | Leave a comment

Binary search.

head 1.2; access; symbols; locks root:1.2; strict; comment @ * @; 1.2 date 2015.02.28.09.26.43; author root; state Exp; branches; next 1.1; 1.1 date 2015.02.27.12.00.41; author root; state Exp; branches; next ; desc @@ 1.2 log @this program is about binary … Continue reading

Posted in Data Structures with C | Leave a comment

Reversing of array.

head 1.2; access; symbols; locks root:1.2; strict; comment @ * @; 1.2 date 2002.01.01.01.04.00; author root; state Exp; branches; next 1.1; 1.1 date 2002.01.01.00.56.25; author root; state Exp; branches; next ; desc @used tem variable to interchange the position. array … Continue reading

Posted in Data Structures with C | Leave a comment

Program that reads until 0 is entered & reports even , odd integers & their averages.

#include 2 int main() 3 { 4 int num=0,evn=0,odd=0,even_sum=0,odd_sum=0; 5 6 7 for(;;) 8 { 9 printf(“enter the numbers\n”); 10 scanf(“%d”, &num); 11 12 if(num==0) 13 { 14 break; 15 } 16 17 else if(num%2==0) 18 { 19 evn++; 20 … Continue reading

Posted in Uncategorized | Leave a comment

Computing real roots of quadratic equation.

RCS file: quad.c,v Working file: quad.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: —————————- revision 1.1 locked by: root; date: 2015/02/25 06:22:57; author: root; state: Exp; … Continue reading

Posted in Uncategorized | Leave a comment

A number can be special,larger or it can be special but not scary.

RCS file: special.c,v Working file: special.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: —————————- revision 1.1 locked by: root; date: 2015/02/21 07:40:24; author: root; state: Exp; … Continue reading

Posted in Uncategorized | Leave a comment

Area of square & triangle

RCS file: area.c,v Working file: area.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: —————————- revision 1.1 locked by: root; date: 2015/02/21 06:35:32; author: root; state: Exp; … Continue reading

Posted in Data Structures with C | Leave a comment

Finding out largest number & the smallest number.

RCS file: largest.c,v Working file: largest.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: this is abt —————————- revision 1.2 locked by: root; date: 2015/02/20 08:50:26; author: … Continue reading

Posted in Data Structures with C | Leave a comment