EmbLogic's Blog

Category Archives: Uncategorized

RCS file: 2nd_q_4.c,v Working file: 2nd_q_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: enter multiple numbers from user then print largest smallest number. —————————- revision 1.1 … Continue reading

Posted in Uncategorized | Leave a comment

RCS file: 1st_q_4.c,v Working file: 1st_q_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: check the entered number by the user is positive or negative. —————————- revision … Continue reading

Posted in Uncategorized | Leave a comment

master array using function

1 2 RCS file: header.h,v 3 Working file: header.h 4 head: 1.1 5 branch: 6 locks: strict 7 access list: 8 symbolic names: 9 keyword substitution: kv 10 total revisions: 1;     selected revisions: 1 11 description: 12 include all header … Continue reading

Posted in Uncategorized | Leave a comment

Problem in setting file permissions from open. Want help.

I want to give the permissions of 0666 to my file. But due to the masking done by the umask, I am unable to set the desired file permissions. If anybody have solutions, I would be thankful.

Posted in Uncategorized | Leave a comment

Master Array Using Function With RCS

2 RCS file: file.c,v 3 Working file: file.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 This is main Program … Continue reading

Posted in Uncategorized | Leave a comment

Master Array

#include”header.h” int my_open(char*); char* m_array(int); int main(int argc,char*argv[]) { int fd; char *ma; fd=my_open(argv[1]); ma=m_array(fd); printf(“the master array is %s”,ma); } int my_open(char*name) { int fd; fd=open(name,O_RDONLY); if(fd<0) { perror(“open”); exit(-1); } printf(“file opened successfully with fd=%d”,fd); return fd; } … Continue reading

Posted in Uncategorized | Leave a comment

rlog / master array

RCS file: marray.c,v Working file: marray.c head: 1.10 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 10; selected revisions: 10 description: this the program for master array —————————- revision 1.10 date: 2014/07/18 08:53:24; author: root; state: … Continue reading

Posted in Uncategorized | Leave a comment

program for stack using link list

head 1.5; access; symbols; locks root:1.5; strict; comment @ * @; 1.5 date 2014.07.17.03.57.50; author root; state Exp; branches; next 1.4; 1.4 date 2014.07.16.13.55.28; author root; state Exp; branches; next 1.3; 1.3 date 2014.07.16.13.52.30; author root; state Exp; branches; next … Continue reading

Posted in Uncategorized | Leave a comment

char driver ( read multiple qset n multiple quantum )

RCS file: reader.c,v Working file: reader.c head: 1.74 branch: locks: strict root: 1.74 access list: symbolic names: keyword substitution: kv total revisions: 74; selected revisions: 74 description: —————————- revision 1.74 locked by: root; date: 2014/07/17 02:24:05; author: root; state: Exp; … Continue reading

Posted in Uncategorized | Leave a comment

char driver(write multiple qset n multiple quantum)

RCS file: write.c,v Working file: write.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: —————————- revision 1.1 date: 2014/07/12 02:59:42; author: root; state: Exp; Initial revision =============================================================================

Posted in Uncategorized | Leave a comment

Program in c to print sin wave.

#include<stdio.h> #include<math.h> int main() { double a,b,i; int j; int count=0; a=22.0/7.0; for(i=0.0; i <= 4.0; i+=0.1) { b= sin(a*i)+ cos(a*i); if(b >= 0) { printf(”          “); for(j =10*b;j >= 0.0; j-=1.0) { printf(” “); } } if(b < 0.0) … Continue reading

Posted in Uncategorized | Leave a comment

concatinate two strings using function,pointer and memory allocation

#include<stdio.h> #include<stdlib.h> int main() { char a[20]={0},b[10]={0}; int i,j=0; printf(“Enter name1:\n”); scanf(“%s”,a); printf(“Enter second name:\n”); scanf(“%s”,b); for(i=0;i<20;i++) { if(a[i]==”) { a[i]=b[j]; j++; } } printf(“Concatination is: %s\n”,a); return 0; }   note: – output enter the name 1=hye enter the … Continue reading

Posted in Uncategorized | Leave a comment

LINKLIST CREATE MULTIPLE NODES DLETE MULTIPLE NODE IN SINGLE TIME

RCS file: ./linklist1.c,v Working file: ./linklist1.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: make a struct for linklist and defined three pointers start,prev,end . data store … Continue reading

Posted in Uncategorized | Leave a comment

program to attach two string

1#include <stdio.h> 2 #include <string.h> 3int main() 4 { 5 char a[100],b[100]; 6  printf(“Enter the first string\n”); 7          fgets(a); 8           printf(“Enter the second string\n”); 9          fgets(b); 10           strcat(a,b); 11           printf(“String obtained on concatenation is %s\n”,a); … Continue reading

Posted in Uncategorized | Leave a comment

file handling

#include<stdio.h> #include<stdlib.h> #include<fcntl.h> int main() { int count,fd; char buf[50]; fd=open(“filem.c”,O_RDONLY,S_IRWXU); count=read(fd,buf,50); if(fd<0) { perror(“open”); exit(-1); } printf(“the value of count=%d and value of buf=%s”,count,buf); close(fd); }   note :-       where file : filem.c contain data “she sells sea shell … Continue reading

Posted in Uncategorized | Leave a comment