EmbLogic's Blog

C assignment no. 14

RCS file: 1.c,v
Working file: 1.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
STRUCTURE ASSIGNMENT
—————————-
revision 1.2
date: 2014/09/27 00:30:59; author: root; state: Exp; lines: +1 -1
use of array structure for record student information
—————————-
revision 1.1
date: 2014/09/27 00:30:13; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 1.1.c,v
Working file: 1.1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
student record using structure pointer.
—————————-
revision 1.1 locked by: root;
date: 2014/09/27 01:53:02; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/1.2.c,v: No such file or directory
rlog: RCS/1.3,v: No such file or directory

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the code to add two distances in feet and inches using structure.
—————————-
revision 1.1 locked by: root;
date: 2014/11/04 22:08:17; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the code to add two distances in feet and inches using structure pointer
—————————-
revision 1.1 locked by: root;
date: 2014/11/04 22:10:10; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
SA4
—————————-
revision 1.8 locked by: root;
date: 2014/11/05 00:05:32; author: root; state: Exp; lines: +45 -17
implement the function addrecord to add the record of students
—————————-
revision 1.7
date: 2014/11/04 22:49:03; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.6
date: 2014/11/04 22:44:49; author: root; state: Exp; lines: +1 -3
*** empty log message ***
—————————-
revision 1.5
date: 2014/11/04 22:42:31; author: root; state: Exp; lines: +1 -1
write statement to exit from infinite while loop
—————————-
revision 1.4
date: 2014/11/04 22:42:00; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.3
date: 2014/11/04 22:38:58; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.2
date: 2014/11/04 22:35:24; author: root; state: Exp; lines: +4 -3
implement the structure element,menu table in while loop and switch cases;
—————————-
revision 1.1
date: 2014/11/04 22:33:58; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment14]#

Posted in Data Structures with C | Leave a comment

C assignment no. 8

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the basic pointer concepts
understand that pointer stores a logical address in it
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 16:39:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
understand the malloc concept to allocate dynamic memory to a pointer to store some data dynamically(run time)
use type casting to store data in a desired fashion(int *,char *….)
—————————-
revision 1.2 locked by: root;
date: 2014/10/30 17:08:23; author: root; state: Exp; lines: +5 -5
understand that if s=a=malloc…..then if i assign a value to a it indirectlly assign to both a and b
understand the difference among *s++,(*s)++,*++s and ++(*s)or ++*s
—————————-
revision 1.1
date: 2014/10/30 16:49:59; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept of double pointer
if *ppi is double pointer then ppi=&pn and *pn=&num is used
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 17:43:43; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
understand the logic behind *s[]
s[1] print the data present at 1st position
&s[1] and s+1 print the logical address where the data is stored
—————————-
revision 1.2 locked by: root;
date: 2014/10/30 18:54:43; author: root; state: Exp; lines: +9 -3
understand the concept of tripple pointer
print the output as
addresses of data content of *s[] are :0x80498d0 0x80498d4 0x80498d8 0x80498dc
addresses of *ptr[] are :0x80498dc 0x80498d8 0x80498d4 0x80498d0
addresses of ptr[] are :0xbf8820cc 0xbf8820d0 0xbf8820d4 0xbf8820d8
address of ptr :0xbf8820cc
address of p :0xbf8820cc
address of ++p :0xbf8820d0
value of **p pink
ink
—————————-
revision 1.1
date: 2014/10/30 18:06:10; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/5.c,v: No such file or directory

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
unserstand the command line argument concept
print argc value and argv[]‘s value
—————————-
revision 1.1
date: 2014/10/30 19:46:31; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.c,v
Working file: 7.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find out the first byte of array elements
—————————-
revision 1.1
date: 2014/10/30 19:54:33; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the concept to find the number of elements before occurence of 0;
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 19:58:41; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment8]#

Posted in Data Structures with C | Leave a comment

C assignment no. 7

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand array concept by getting input in array and displaying on terminal
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 18:38:40; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
add two array and store the result in third array and display the result
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 18:42:47; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
get the average of n numbers using array
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 18:45:36; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find the largest number in an array
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 18:52:36; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 5.c,v
Working file: 5.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the concept to find out the smallest number in a array
/
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 19:11:00; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find a key value inside an array(linear search/sequential serach)
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 19:19:59; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.c,v
Working file: 7.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to reverse the order of array elements
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 19:26:09; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to merge two array in third array
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 19:29:21; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9.c,v
Working file: 9.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement binary search algorithm to search a key element
fast process with a limitation that all elements should be sorted
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 19:53:42; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to insert a element inside an array
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 20:14:24; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 11.c,v
Working file: 11.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to delete an element from the array
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 20:16:43; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12.c,v
Working file: 12.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to sort an array using bubble sort
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 21:24:31; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13.c,v
Working file: 13.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to sort an array using insertion technique
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 00:27:54; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 14.c,v
Working file: 14.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to sort an array using selection sort method
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 02:16:30; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 15.c,v
Working file: 15.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to add the two matrix
print them on terminal in a standard matrix form
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 02:28:06; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/16.c,v: No such file or directory

RCS file: 17.c,v
Working file: 17.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to get transpose of a matrix
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 02:33:24; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 18.c,v
Working file: 18.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to multiply two matrix
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 02:45:22; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 19.c,v
Working file: 19.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to sort a order 6 matrix.
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 03:19:28; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 20.c,v
Working file: 20.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find a 3*3 matrix into 4*4 matrix
..
—————————-
revision 1.1 locked by: root;
date: 2014/10/30 16:22:15; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment7]#

Posted in Data Structures with C | Leave a comment

C assignment no. 6

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
do practice of while,for loop
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 02:35:55; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of continue,putchar() and break function in the switch cases
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 03:01:02; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understant the difference b/w c<0 and c<'0'
a,b,c,d….A,B,C…..and 0,1,2,3,….are less than '0' i.e c0 since 0 represent the ascii value but ’0′ represent the character
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 15:53:25; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
observe that by looping f=f+0.1f 10 times then the if condition f==1.0f is not true
what is the significance of 0.0f???
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 16:25:24; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/5.c,v: No such file or directory

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to generate the fibonacci series for n term entered by user
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 16:38:17; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.c,v
Working file: 7.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to count number of sets bits in a number.
—————————-
revision 1.1
date: 2014/10/29 16:45:55; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/8.c,v: No such file or directory

RCS file: 9.c,v
Working file: 9.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to convert minutes in the form of hour and minutes
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 16:58:56; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find the number whether it is odd or even
count the total odd and even numbers
find out the averages of odd numbers and even numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 17:12:27; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment6]#

Posted in Data Structures with C | Leave a comment

C assignment no .5

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept behind
if(y0)x=3;
else x=5; and
if(z=(y==0))x=5; and
if(x=y=z)x=3;
this is assignment inside the if conditions
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:35:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept behind
if(i && j++)
here if above condition is true then data will be manupulated otherwise not
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:43:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept that float a=1.1 and double b=1.1 are not equal
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:47:44; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
practice of switch statement
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:50:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 5.c,v
Working file: 5.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
leaf year concept
—————————-
revision 1.2 locked by: root;
date: 2014/10/26 14:19:28; author: root; state: Exp; lines: +11 -0
implement leap year concept in a single statement
—————————-
revision 1.1
date: 2014/10/26 13:52:22; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement if else logic to determine the type of the traingle
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 14:28:50; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.1.c,v
Working file: 7.1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to determine whether a no. is a power of 2 or not using for loop and if condition having more than one statement.
—————————-
revision 1.1 locked by: root;
date: 2014/10/28 20:44:21; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.2.c,v
Working file: 7.2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the same concept as 7.1.c using log function by making it base of 2;
—————————-
revision 1.1 locked by: root;
date: 2014/10/28 20:56:31; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.3.c,v
Working file: 7.3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the same concept in a single statement using bit operation
—————————-
revision 1.1 locked by: root;
date: 2014/10/28 21:04:39; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the shoe size and foot length(inches) logic w/o using loop
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 00:45:38; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8usingloop.c,v
Working file: 8usingloop.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the shoe size and foot length logic using loop
understand the necessity of loop in c programming
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 00:47:21; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/9.c,v: No such file or directory

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find out the number which is special but not scary
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 01:50:48; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment5]# vim 9.c
[root@VIPIN c_assignment5]# ci 9.c
9.c,v > .
initial revision: 1.1
done
[root@VIPIN c_assignment5]# co -l 9.c
9.c,v –> 9.c
revision 1.1 (locked)
done
[root@VIPIN c_assignment5]# rlog 1.c 2.c 3.c 4.c 5.c 6.c 7.1.c 7.2.c 7.3.c 8.c 8usingloop.c 9.c 10.c

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept behind
if(y0)x=3;
else x=5; and
if(z=(y==0))x=5; and
if(x=y=z)x=3;
this is assignment inside the if conditions
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:35:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept behind
if(i && j++)
here if above condition is true then data will be manupulated otherwise not
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:43:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept that float a=1.1 and double b=1.1 are not equal
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:47:44; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
practice of switch statement
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 13:50:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 5.c,v
Working file: 5.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
leaf year concept
—————————-
revision 1.2 locked by: root;
date: 2014/10/26 14:19:28; author: root; state: Exp; lines: +11 -0
implement leap year concept in a single statement
—————————-
revision 1.1
date: 2014/10/26 13:52:22; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement if else logic to determine the type of the traingle
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 14:28:50; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.1.c,v
Working file: 7.1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to determine whether a no. is a power of 2 or not using for loop and if condition having more than one statement.
—————————-
revision 1.1 locked by: root;
date: 2014/10/28 20:44:21; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.2.c,v
Working file: 7.2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the same concept as 7.1.c using log function by making it base of 2;
—————————-
revision 1.1 locked by: root;
date: 2014/10/28 20:56:31; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.3.c,v
Working file: 7.3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the same concept in a single statement using bit operation
—————————-
revision 1.1 locked by: root;
date: 2014/10/28 21:04:39; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the shoe size and foot length(inches) logic w/o using loop
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 00:45:38; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8usingloop.c,v
Working file: 8usingloop.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the shoe size and foot length logic using loop
understand the necessity of loop in c programming
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 00:47:21; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9.c,v
Working file: 9.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: 2014/11/22 03:47:50; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find out the number which is special but not scary
—————————-
revision 1.1 locked by: root;
date: 2014/10/29 01:50:48; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment5]#

Posted in Data Structures with C | Leave a comment

C assignment no.4

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use of if-else statement to determine a number wheather it is postive or negative.
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 00:03:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use of else-if and && operator to find largest and smallest numbers among 5 numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 00:05:26; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use of if -else if ,&& operators to determin students grade
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 00:07:55; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/4.c,v: No such file or directory

RCS file: 5.c,v
Working file: 5.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
understand the use of rand() function to generate a random number having specified range as
num=rand()%100 produce a number within 1 to 100
—————————-
revision 1.2 locked by: root;
date: 2014/10/25 00:55:28; author: root; state: Exp; lines: +4 -11
implement the c code to convert inches to centimeter
—————————-
revision 1.1
date: 2014/10/25 00:42:09; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the concept to add two number in feet and inches
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 02:08:40; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.c,v
Working file: 7.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to get the sum of 1-3^3 + 5^5……..for n=333
ans:386600045
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 13:36:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the Sri dharacharya formula and different cases depending upon coefficients of equation
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 13:48:02; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9.c,v
Working file: 9.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use for switch statement to determine the colour code of resister
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 14:02:04; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement code to get difference b/w two numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 20:34:03; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 11.c,v
Working file: 11.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the code to find the area of square and triangle
—————————-
revision 1.1 locked by: root;
date: 2014/10/25 21:11:38; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12.c,v
Working file: 12.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to remove comment eg: //…… and /*……*/ from the c program
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 02:39:35; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12com.c,v
Working file: 12com.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: 2014/11/22 03:43:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12wc.c,v
Working file: 12wc.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: 2014/11/22 03:44:25; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13.c,v
Working file: 13.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to find the distance b/w two points
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 03:36:47; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 14.c,v
Working file: 14.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to determine the year whether it is leap or common.
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 03:53:40; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 15.c,v
Working file: 15.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implemnt the logic to determine wages of the worker depending upon working hours per day
—————————-
revision 1.1 locked by: root;
date: 2014/10/26 04:09:36; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment4]#

Posted in Data Structures with C | Leave a comment

C assignment no .3

RCS file: 1,v
Working file: 1
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the need of C language.
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 16:26:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2,v
Working file: 2
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the compiler
difference b/w compiler and interpreter
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 16:44:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3,v
Working file: 3
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
about data types
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 19:46:59; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4,v
Working file: 4
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
general syntax to declare data type
—————————-
revision 1.1
date: 2014/10/23 19:48:36; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 5,v
Working file: 5
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
size of different data types
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 19:58:27; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Do practice for switch statement
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 19:59:43; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7,v
Working file: 7
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the logic behind ELF
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 20:09:33; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8,v
Working file: 8
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the memory layout of C program.
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 21:02:36; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9,v
Working file: 9
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
type specifier
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 21:12:15; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
unsderstand the use of format specifier %04d,%3.2f,%%
—————————-
revision 1.1
date: 2014/10/23 21:25:00; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/11.c,v: No such file or directory

RCS file: 12.c,v
Working file: 12.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
compare float and integer numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 04:25:02; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13.c,v
Working file: 13.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
compare 2 float numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 04:23:13; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 14.c,v
Working file: 14.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use of \n
—————————-
revision 1.1
date: 2014/10/24 04:26:36; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 15.c,v
Working file: 15.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to print star brick
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 04:41:24; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 16.c,v
Working file: 16.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to convert decimal number to binary number.
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 04:42:25; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 17.c,v
Working file: 17.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement to print table of any number
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 23:04:17; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 18.c,v
Working file: 18.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use pow function present in math.h header file to obtain square of a number
observe that -lm is used to compile if pow function is used
gcc -lm 18.c
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 23:06:22; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 19.c,v
Working file: 19.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: 2014/11/22 03:31:33; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 20.c,v
Working file: 20.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to reverse the digits sequence of the mobile number
—————————-
revision 1.1 locked by: root;
date: 2014/10/24 23:33:33; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment3]#

Posted in Data Structures with C | Leave a comment

C assignment no.2

RCS file: 1.c,v
Working file: 1.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
print hello world
/
—————————-
revision 1.2 locked by: root;
date: 2014/10/22 15:57:31; author: root; state: Exp; lines: +1 -1
print “hello world” usnig \” to print “.
—————————-
revision 1.1
date: 2014/10/22 12:48:03; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print the sum of n numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 12:50:20; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print “Hello”
“welcome \to \Emblogic Embedded \Technologies Pvt Ltd”
using \\ to print \ and \” to print “.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 16:03:48; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
understand the limitation of scanf
understand the use of gets()
—————————-
revision 1.2 locked by: root;
date: 2014/10/22 16:35:31; author: root; state: Exp; lines: +2 -2
if the size of array is less than the size of entered string it print but if string size is less than 34 character otherwise segmentation fault occure.
—————————-
revision 1.1
date: 2014/10/22 16:19:42; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 5.c,v
Working file: 5.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
swap two numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 16:44:02; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to reverse the digit sequence using % and / operator
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 17:36:48; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.c,v
Working file: 7.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print
Emblogic Embedded Technologies Pvt Ltd
D-64,First Floor,Noida Sector -2,UP-201203
011-25555555
vipin
—————————-
revision 1.1
date: 2014/10/22 17:52:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print the size of int,float,long int ,char,double
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 17:59:04; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9a.c,v
Working file: 9a.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept of return value of printf
—————————-
revision 1.1
date: 2014/10/22 18:06:07; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9b.c,v
Working file: 9b.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print return value of printf(“hello world %d”,20);
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 18:44:32; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9c.c,v
Working file: 9c.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print the return value of printf(“hello world\n%d”,printf(“%d”,100));
understand the concept of execution sequence of printf function
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 18:46:24; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9d.c,v
Working file: 9d.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
print the return value of
int i=100;
k=printf(“%d”,printf(“%d%d”,i,printf(“%d”,10)));
—————————-
revision 1.2 locked by: root;
date: 2014/10/22 18:50:49; author: root; state: Exp; lines: +0 -1
return value is 10100241
—————————-
revision 1.1
date: 2014/10/22 18:48:30; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9e.c,v
Working file: 9e.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print the return value of
int i=100;
k=printf(“hello world\n%d”,printf(“%d%d”,i,printf(“%d”,100)));
as
1001003hello world
413
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 18:57:34; author: root; state: Exp;
Initial revision
=============================================================================
rlog: RCS/10a.c,v: No such file or directory

RCS file: 10b.c,v
Working file: 10b.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
check the same concept for character variable
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 19:29:29; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10c.c,v
Working file: 10c.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
check same concept as above
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 19:33:45; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10d.c,v
Working file: 10d.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
check the same concept for number,character and string
—————————-
revision 1.1
date: 2014/10/22 19:38:44; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 11.c,v
Working file: 11.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of format specifier corresponds to decimal,hexadecimal and octal number
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:02:56; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12a.c,v
Working file: 12a.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the concept of assignment of octal number
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:07:10; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12b.c,v
Working file: 12b.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the method to assign a hexadecimal value to a variable
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:10:11; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13a.c,v
Working file: 13a.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand that if(f==2.5) is valid statement
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:14:25; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13b.c,v
Working file: 13b.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
f=2.5 if(f>2.5)is not true statement
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:18:45; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13c.c,v
Working file: 13c.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
float f=2.5 if(f==2.5f) is true statement
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:24:13; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13d.c,v
Working file: 13d.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the effect of interchange the format specifier of integer and float numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:37:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13e.c,v
Working file: 13e.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the positional relation b/w format specifier and optional arguments in prinf() function
eg:printf(“%c%d%f%o”,ch);
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 20:44:16; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 14.c,v
Working file: 14.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
print the ranges of data types using limit.h
Minimum and maximum values a ‘signed char’ can hold.
SCHAR_MIN:-128
SCHAR_MAX:127
Maximum value an ‘unsigned char’ can hold. (Minimum is 0.)
UCHAR_MAX:255
Minimum and maximum values a ‘char’ can hold.
CHAR_MIN:-128
CHAR_MAX:127
Minimum and maximum values a signed short int’ can hold
SHRT_MIN:-32768
SHRT_MAX:32767Maximum value an unsigned short int’ can hold. (Minimum is 0.)
USHRT_MAX:65535
Maximum value an signed int’ can hold. (Minimum is 0.)
INT_MIN:-2147483648
INT_MAX:2147483647
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 22:24:33; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 15.c,v
Working file: 15.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the differece b/w 1 and ’1′
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 22:37:13; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 16.c,v
Working file: 16.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of switch statement….
—————————-
revision 1.1
date: 2014/10/23 02:33:56; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 17.c,v
Working file: 17.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use of switch to determine vowel.
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 02:42:52; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 18.c,v
Working file: 18.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the factorial concept
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 02:55:50; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 19.c,v
Working file: 19.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
implement the logic to get LCM of three numbers
—————————-
revision 1.2 locked by: root;
date: 2014/10/23 14:59:20; author: root; state: Exp; lines: +25 -0
implement logic to get HCF of 3 numbers
—————————-
revision 1.1
date: 2014/10/23 14:34:57; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 20.c,v
Working file: 20.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the logic to check a number wheather it is a pilandrome or not.
—————————-
revision 1.1 locked by: root;
date: 2014/10/23 15:11:42; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment2]#

Posted in Data Structures with C | Leave a comment

C assignment no.1

RCS file: 1.c,v
Working file: 1.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use of printf to print data on screen
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:09:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 2.c,v
Working file: 2.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
use of format specifier %s,%d,%f,%.2f,%c
—————————-
revision 1.3 locked by: root;
date: 2014/10/22 01:18:42; author: root; state: Exp; lines: +2 -2
understand the use of %.3f and %2.3f(same as prev).
—————————-
revision 1.2
date: 2014/10/22 01:14:31; author: root; state: Exp; lines: +1 -1
understand how to print ASCII value of a character
—————————-
revision 1.1
date: 2014/10/22 01:10:55; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 3.c,v
Working file: 3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of abs() function to print positive value of a number
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:27:28; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 4.c,v
Working file: 4.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of \n \t.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:30:03; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 5.c,v
Working file: 5.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of 4 basic data type int,char,float and double and their corresponding format specifier.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:35:44; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 6.c,v
Working file: 6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand that how to initialization and reinitialization of variable
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:40:17; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 7.c,v
Working file: 7.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of scanf function
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:42:20; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 8.c,v
Working file: 8.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of arithmatic operation inside code
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:43:25; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 9.c,v
Working file: 9.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of arithmatic operation to conver meter to centimeter
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:45:26; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 10.c,v
Working file: 10.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
implement the concept to swap two no, using 3rd temporary variable
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 01:48:20; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 11.c,v
Working file: 11.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
find the solution to swap two number w/o using 3rd variable
using a=(a+b)-(b=a);
but find overflow problem for too large numbers
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 02:17:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 12.c,v
Working file: 12.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the initialization and declaration and use of global varaible.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 02:20:29; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 13.c,v
Working file: 13.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the scope rule of the local variable
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 02:44:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 14.c,v
Working file: 14.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of const qualifiers
After reassign this const variable i got a error.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 02:47:32; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 15.c,v
Working file: 15.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the effect of misplacement of declaration and assignment of a variable.
I got compile time error when i assign a variable after using the printf statement to print it.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 02:55:26; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 16.c,v
Working file: 16.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
multiply two float no.
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 03:00:36; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 17.c,v
Working file: 17.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the difference b/w c++ and ++c
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 03:05:19; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 18.c,v
Working file: 18.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of i=i+i+1;
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 03:08:09; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 19.c,v
Working file: 19.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
make pi value 3.14 as contant by using const double PI throughout the entire program
—————————-
revision 1.1 locked by: root;
date: 2014/10/22 03:15:30; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 20.c,v
Working file: 20.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
calculate simple intrest
—————————-
revision 1.1
date: 2014/10/22 03:21:09; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 21.c,v
Working file: 21.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
calculate area of the sqare
—————————-
revision 1.1
date: 2014/10/22 03:22:59; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 22.c,v
Working file: 22.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understant the use of / and % operator
—————————-
revision 1.1
date: 2014/10/22 03:23:55; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: 23.c,v
Working file: 23.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
understand the use of sizeof() function
—————————-
revision 1.1
date: 2014/10/22 03:24:59; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN c_assignment1]#

Posted in Data Structures with C | Leave a comment

IPC based project using threads

RCS for sever file

RCS file: server.c,v
Working file: server.c
head: 1.34
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 34; selected revisions: 34
description:
server program using threads
—————————-
revision 1.34
date: 2014/11/21 06:58:33; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.33
date: 2014/11/21 06:57:13; author: root; state: Exp; lines: +8 -4
*** empty log message ***
—————————-
revision 1.32
date: 2014/11/21 06:39:39; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.31
date: 2014/11/21 06:37:42; author: root; state: Exp; lines: +1 -1
give client id as a type for message queue
—————————-
revision 1.30
date: 2014/11/21 06:13:45; author: root; state: Exp; lines: +21 -37
make 100 threads
—————————-
revision 1.29
date: 2014/11/20 09:46:12; author: root; state: Exp; lines: +12 -5
*** empty log message ***
—————————-
revision 1.28
date: 2014/11/20 09:16:19; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.27
date: 2014/11/20 09:15:35; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.26
date: 2014/11/20 09:10:45; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.25
date: 2014/11/20 09:09:43; author: root; state: Exp; lines: +6 -6
*** empty log message ***
—————————-
revision 1.24
date: 2014/11/20 09:07:43; author: root; state: Exp; lines: +6 -3
*** empty log message ***
—————————-
revision 1.23
date: 2014/11/20 08:59:07; author: root; state: Exp; lines: +5 -5
*** empty log message ***
—————————-
revision 1.22
date: 2014/11/20 08:57:50; author: root; state: Exp; lines: +1 -2
*** empty log message ***
—————————-
revision 1.21
date: 2014/11/20 08:56:35; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.20
date: 2014/11/20 08:56:00; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.19
date: 2014/11/20 08:54:45; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.18
date: 2014/11/20 08:53:47; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.17
date: 2014/11/20 08:52:18; author: root; state: Exp; lines: +5 -4
*** empty log message ***
—————————-
revision 1.16
date: 2014/11/20 08:49:17; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.15
date: 2014/11/20 08:45:13; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.14
date: 2014/11/20 08:37:58; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.13
date: 2014/11/20 08:37:39; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.12
date: 2014/11/20 08:36:57; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.11
date: 2014/11/20 08:30:25; author: root; state: Exp; lines: +15 -17
compute result and write it to themessage queue
—————————-
revision 1.10
date: 2014/11/20 07:59:41; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.9
date: 2014/11/20 07:57:11; author: root; state: Exp; lines: +4 -0
*** empty log message ***
—————————-
revision 1.8
date: 2014/11/20 07:52:29; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.7
date: 2014/11/20 07:50:32; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.6
date: 2014/11/20 07:47:57; author: root; state: Exp; lines: +54 -6
depending upon the information received new thread is created using pthread_create function call
—————————-
revision 1.5
date: 2014/11/20 06:52:56; author: root; state: Exp; lines: +9 -1
receive message from message queue using msgrcv function call
—————————-
revision 1.4
date: 2014/11/20 06:42:53; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2014/11/20 06:39:55; author: root; state: Exp; lines: +19 -1
create meassage queue using msgget function
control message queue operation using msgctl
—————————-
revision 1.2
date: 2014/11/19 19:36:38; author: root; state: Exp; lines: +1 -1
included file header.h
—————————-
revision 1.1
date: 2014/11/19 18:06:28; author: root; state: Exp;
Initial revision
=============================================================================

RCS for client file
RCS file: ./client1.c,v
Working file: ./client1.c
head: 1.11
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 11; selected revisions: 11
description:
this is a file for client 1 which communicates with the server
—————————-
revision 1.11
date: 2014/11/21 06:38:26; author: root; state: Exp; lines: +2 -1
get process id and send to the server
—————————-
revision 1.10
date: 2014/11/20 09:32:50; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.9
date: 2014/11/20 08:35:23; author: root; state: Exp; lines: +3 -1
recieve reesult from the message queue
—————————-
revision 1.8
date: 2014/11/20 06:41:03; author: root; state: Exp; lines: +15 -1
define a variable of the form struct msgbuf
assign value to the variable
send data to through message queue
—————————-
revision 1.7
date: 2014/11/19 20:15:01; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.6
date: 2014/11/19 20:14:35; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.5
date: 2014/11/19 20:13:50; author: root; state: Exp; lines: +8 -3
use msgctl to control message queue operations
—————————-
revision 1.4
date: 2014/11/19 19:57:16; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.3
date: 2014/11/19 19:54:52; author: root; state: Exp; lines: +11 -0
use msgget function to create message queue
—————————-
revision 1.2
date: 2014/11/19 19:37:48; author: root; state: Exp; lines: +1 -1
included file header.h
—————————-
revision 1.1
date: 2014/11/19 18:10:35; author: root; state: Exp;
Initial revision
=============================================================================
RCS for header file

RCS file: ./header.h,v
Working file: ./header.h
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
header file for client-serverr program using threads
—————————-
revision 1.8
date: 2014/11/21 06:38:06; author: root; state: Exp; lines: +2 -0
define a new element p_id in structure msgbuf
—————————-
revision 1.7
date: 2014/11/21 06:14:25; author: root; state: Exp; lines: +1 -3
give prototype for perform_op
remove prototype for perform_add, perform_sub, perform_mul functions
—————————-
revision 1.6
date: 2014/11/20 08:36:18; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.5
date: 2014/11/20 08:34:49; author: root; state: Exp; lines: +6 -0
define a structure named result to store the computed result
—————————-
revision 1.4
date: 2014/11/20 07:48:49; author: root; state: Exp; lines: +4 -1
included header file pthread.h
give prototype for threads perofrm_add, perform_sub, perform_mul
—————————-
revision 1.3
date: 2014/11/19 20:17:58; author: root; state: Exp; lines: +15 -0
define a structure msg_format to define format of information send by client
—————————-
revision 1.2
date: 2014/11/19 19:36:52; author: root; state: Exp; lines: +3 -1
included header files sys/types.h , sys/ipc.h , sys/msg.h to use message queue as a IPC mechanism
—————————-
revision 1.1
date: 2014/11/19 18:10:51; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

EIA/TIA RS 232 -E specification for data transfer over serial channel( Sending large amount of data ~7MB)

Summary :
- Successful hand shaking as per RS 232 protocol between
the DTE and DCE.
- ~7MB of data transferred in 13 min. 7 sec.
- Data transfer rate is approximately 900 bytes per
second.
- Circular buffer implemented in writer module of DTE.

log files :——————————–
>> read :
2 RCS file: dev_read.c,v
3 Working file: dev_read.c
4 head: 1.3
5 branch:
6 locks: strict
7 root: 1.3
8 access list:
9 symbolic names:
10 keyword substitution: kv
11 total revisions: 3; selected revisions: 3
12 description:
13 read module for transfering 7 mb of data over the serial channel using RS-232 protocol.
14 —————————-
15 revision 1.3 locked by: root;
16 date: 2014/11/21 19:28:25; author: root; state: Exp; lines: +0 -2
17 removed debugging symbols.
18 driver in release mode
19 successful implementation of the read module.
20 7 MB of data successfully received.
21
22
23 The reader has no way of knowing when the writer will stop sending data, thus to overcome this the application on the
24 DCE end is to know(explicitly) how musch data is to be send by the DTE.
25 —————————-
26 revision 1.2
27 date: 2014/11/21 19:26:21; author: root; state: Exp; lines: +2 -18
28 successfully implemented the reader module for the DCE.
29 able to receive 7MB of data.
30 time taken to transfer 7MB is 13 minutes.

——————————————————–
>> write :

2 RCS file: dev_write.c,v
3 Working file: dev_write.c
4 head: 1.3
5 branch:
6 locks: strict
7 access list:
8 symbolic names:
9 keyword substitution: kv
10 total revisions: 3; selected revisions: 3
11 description:
12 Sending a file of 7 mb on a serial channel, using the RS 232 protocol.
13 —————————-
14 revision 1.3
15 date: 2014/11/21 19:21:46; author: root; state: Exp; lines: +1 -7
16 Removed the comments.
17 write module ready for release.
18 —————————-
19 revision 1.2
20 date: 2014/11/21 19:15:27; author: root; state: Exp; lines: +3 -5
21 Implemented hand shaking between the DTE and DCE.
22 DTE has a circular buffer (max size of buffer = 4k bytes).
23 —————————-

Posted in Serial Port Driver | Leave a comment

ipc using FIFO

RCS file: ./server.c,v
Working file: ./server.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
includd all the header files that will be used inn the functions
created a structure for two numbers and operation
—————————-
revision 1.6 locked by: root;
date: 2014/11/21 21:42:35; author: root; state: Exp; lines: +1 -1
server read the data
send the result to requesting client
the client displayed the result
—————————-
revision 1.5
date: 2014/11/21 21:41:37; author: root; state: Exp; lines: +1 -1
opened the fifo in read only mode
read the data
proceessed the data
and sent the result back to the server
—————————-
revision 1.4
date: 2014/11/21 21:40:34; author: root; state: Exp; lines: +1 -1
created fifo between server and process
opened the fifo in write only mode
eorte data to the process
—————————-
revision 1.3
date: 2014/11/21 21:38:51; author: root; state: Exp; lines: +1 -1
in server,opened the fifo in read only mode
read the data
—————————-
revision 1.2
date: 2014/11/21 20:27:59; author: root; state: Exp; lines: +1 -1
created a fifo between client and server
opened the fifo in write only mode
wrote data to server
—————————-
revision 1.1
date: 2014/11/21 20:27:25; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

creation,traversing,insertion and deletion in linked list

RCS file: ./link_list.c,v
Working file: ./link_list.c
head: 1.7
branch:
locks: strict
root: 1.7
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
defineed all the header files that will be used in the code
created the function for entering choices
created the function for operation
—————————-
revision 1.7 locked by: root;
date: 2014/11/21 20:10:31; author: root; state: Exp; lines: +1 -1
created two different functions for deleting a node at the beginning and deleting at the end
—————————-
revision 1.6
date: 2014/11/21 20:09:42; author: root; state: Exp; lines: +1 -1
cfreated the function for deleting a node
—————————-
revision 1.5
date: 2014/11/21 20:09:01; author: root; state: Exp; lines: +1 -1
created the function for traversing
—————————-
revision 1.4
date: 2014/11/21 20:07:51; author: root; state: Exp; lines: +1 -1
created three more functions for
insert in begning
insert at the end
and insert at nth popsitiion
—————————-
revision 1.3
date: 2014/11/21 20:06:55; author: root; state: Exp; lines: +1 -1
created a function for inserting a node in a linked list
—————————-
revision 1.2
date: 2014/11/21 20:00:01; author: root; state: Exp; lines: +1 -1
created the link list by first allocating the memory to the temp
then putting node number in the info part of temp
and NULL in the address part of temp
—————————-
revision 1.1
date: 2014/11/21 19:59:07; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

IEEE 1284-1994 std. device driver for 74LS244 Parallel port- BYTE MODE

RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
File contains header file and macros used
—————————-
revision 1.2 locked by: root;
date: 2014/11/19 10:06:25; author: root; state: Exp; lines: +3 -3
ioport.h , io.h
add delay.h for msleep
—————————-
revision 1.1
date: 2014/11/19 10:03:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: file_operation.h,v
Working file: file_operation.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
File contains application operations mapping to driver operations
—————————-
revision 1.1 locked by: root;
date: 2014/11/19 10:03:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
File contains function declaration and variable declaration
—————————-
revision 1.1 locked by: root;
date: 2014/11/19 10:03:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: driver.c,v
Working file: driver.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
File contains driver init module
—————————-
revision 1.2 locked by: root;
date: 2014/11/19 10:08:27; author: root; state: Exp; lines: +1 -1
Check region at 0×378

if not free, release region
Request for region
—————————-
revision 1.1
date: 2014/11/19 10:03:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
File contains implementation of container_of
—————————-
revision 1.1 locked by: root;
date: 2014/11/19 10:03:05; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
File conatains implementation of copy_from_user
user sent data which is copied to SCULL
—————————-
revision 1.5 locked by: root;
date: 2014/11/19 10:23:13; author: root; state: Exp; lines: +1 -1
Sent strobe that data is valid
—————————-
revision 1.4
date: 2014/11/19 10:17:14; author: root; state: Exp; lines: +1 -1
check if reader is free, by receiving Acknowlegement
—————————-
revision 1.3
date: 2014/11/19 10:15:30; author: root; state: Exp; lines: +1 -1
sent character to data register
—————————-
revision 1.2
date: 2014/11/19 10:14:13; author: root; state: Exp; lines: +1 -1
Initialy set control register 0×00
—————————-
revision 1.1
date: 2014/11/19 10:03:05; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: devread.c,v
Working file: devread.c
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
File read the data from register and copy to user application
—————————-
revision 1.8 locked by: root;
date: 2014/11/19 11:04:15; author: root; state: Exp; lines: +1 -1
Copy to user application
—————————-
revision 1.7
date: 2014/11/19 11:02:37; author: root; state: Exp; lines: +1 -1
Receieve character from data register
—————————-
revision 1.6
date: 2014/11/19 11:00:46; author: root; state: Exp; lines: +2 -2
Reset strobe to 0
Set 5 bit high for bidirectional in control register
—————————-
revision 1.5
date: 2014/11/19 10:59:32; author: root; state: Exp; lines: +1 -1
Check for Acknowledgement that the coming data is valid
—————————-
revision 1.4
date: 2014/11/19 10:58:01; author: root; state: Exp; lines: +1 -1
After 5 sec sent strobe, receiver is free
—————————-
revision 1.3
date: 2014/11/19 10:56:37; author: root; state: Exp; lines: +1 -1
reader sleep for 5 seconds
—————————-
revision 1.2
date: 2014/11/19 10:55:26; author: root; state: Exp; lines: +1 -1
Sent strobe that the receiver is busy in control register
—————————-
revision 1.1
date: 2014/11/19 10:53:45; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: removedriver.c,v
Working file: removedriver.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
File contains exit module
—————————-
revision 1.2 locked by: root;
date: 2014/11/19 10:25:09; author: root; state: Exp; lines: +1 -0
Release region when driver is removed
—————————-
revision 1.1
date: 2014/11/19 10:05:00; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Device Drivers, Parallel Port Driver | Leave a comment

Sending 4k data using Circular buffer through IEEE EIA/TIA – 232E specification and associated serial port device driver(Implementing RS 232 Protocol)

RCS file: header.h,v
Working file: header.h
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: 2014/11/20 04:42:02; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: declaration.h,v
Working file: declaration.h
head:
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 0
description:
=============================================================================
RCS file: initilization.c,v
Working file: initilization.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Implemented check_region(), release_region() and request_region()
—————————-
revision 1.1 locked by: root;
date: 2014/11/20 04:45:10; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Implemented release_region()
—————————-
revision 1.1 locked by: root;
date: 2014/11/20 04:46:32; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_open.c,v
Working file: dev_open.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: 2014/11/20 04:47:34; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_release.c,v
Working file: dev_release.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: 2014/11/20 04:48:34; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_write.c,v
Working file: dev_write.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Made One Scull_dev and one qset_array.
Implemented circular buffer
Written data on circular buffer and outb() data serially.
—————————-
revision 1.1 locked by: root;
date: 2014/11/20 04:52:21; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_read.c,v
Working file: dev_read.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Retrieve data serially from circular buffer
implemented inb() to read data serially
—————————-
revision 1.1 locked by: root;
date: 2014/11/20 04:54:00; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: file_op.h,v
Working file: file_op.h
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: 2014/11/20 04:54:47; author: root; state: Exp;
Initial revision
=============================================================================
Write synopsis:
Here Implementing Circular buffer. noq is the no .of quantum written to the circular buffer.
label:

for(i=0;i<noq;i++)
{

if(idata[i],ubuff(lv*QUANTUM_SIZE),QUANTUM_SIZE);
for(j=0;j<8;j++)
{
printk(KERN_INFO "data[%d] = %c\n",i,ch1);
while((inb(0x3f8+5)&0×60)!=0×60);
outb(ch1,0x3f8);
}
lv++;
}

printk(KERN_INFO "noq = %d\n",noq);
printk(KERN_INFO "QUANTUM_SIZE =%d, i = %d\n",QUANTUM_SIZE,i);
if(i<QUANTUM_SIZE-1)
{
printk(KERN_INFO "Inside if for next quantum\n");
noq = noq- QUANTUM_SIZE;
i = 0;
goto label;
}
}

Posted in Device Drivers, Serial Port Driver | Leave a comment