15,550 Topics

Member Avatar for
Member Avatar for iwanttolearnc

hello sirs. im trying to turn two 8-bit hex characters that represent the lsb and msb of an integer. below is the code i am using. i am getting output though im not sure of the validity. [CODE] char a = 0x01; //msb char b = 0x3D; //lsb short int …

Member Avatar for WaltP
0
117
Member Avatar for zaverijuhi

hello, please help me with the code for IR CONTROL using ATMEGA128 MICROCONTROLLER IN C LANGUAGE.PLEASE HELP.URGENT. THANKYOU.

0
54
Member Avatar for EmbeddedHelp

Hi all, I'm new to the software package and have written a simple code to turn LED's on/off using a Micro Controller device. When away from the Micro Controller, it would be handy to view the bit orientation (turning on/off) on the computer screen, without the actual device to hand. …

0
88
Member Avatar for moroccanplaya

can some one help me why its not copying the file ? [CODE] if(choice = 2) { puts("please open your archive\n"); scanf("%s",&archive); archive_pointer = fopen( archive, "r+b"); //opens the archive puts("please select the file you want to be copied into your archive\n"); scanf("%s",&original_file); open_pointer = fopen( original_file, "r+b"); //opens the …

Member Avatar for moroccanplaya
0
111
Member Avatar for shanki himanshu
Member Avatar for localp

I wrote a C++ program that could sendKey. the code is as Follows; [CODE]s.SendKeys(_T("{Enter}"));s.SendKeys(_T("{Enter}"));[/CODE] this piece if code is inside a function. Now, i need to access this method from a C code. When i added the includes, i get alot of errors. Some says, that you can't access C++ …

Member Avatar for Narue
0
800
Member Avatar for bobyx

Hi,everybody.I wrote a program with mikroC for PIC PRO/2009/V2.50 ,to measure a DC voltage input using 16F877A.But it shows the input dc voltage wrongly and uncorrectly[COLOR="Red"];[ it shows 0.014v instead of correct form; 14v ].[/COLOR] I attached my program and its proteus.would you please tell me what is wrong with …

Member Avatar for bobyx
0
110
Member Avatar for stevanity

I made this code to solve the following problem. On an island chameleons of different color live. Every Monday , the following events occur The number of Black chameleons born is 1000 more than sum of { existing Blue , existing Green and twice the existing White chameleons } The …

0
70
Member Avatar for divyasphoorthy
Member Avatar for vinujohnpanicke

My source code is being altered by itself after executing once or when a copy of the source code file is made. If i try to execute the source code the 2nd time it wont work. There will be some error as there are some unwanted ASCII characters like rectangle,smiley...etc …

Member Avatar for emilo35
0
124
Member Avatar for lionconqueror

Hi everyone. I have a very simple question about converting strings(in hex) into signed integer number. I use strtol, but it does not work at all. char code[]="FFFFFFFF"; int m; m=strtol(code,NULL,16); printf("%d\n",m); but the result is not -1 How can I manage this in C? Best regards.

Member Avatar for lionconqueror
0
96
Member Avatar for amari ♥

#include<stdio.h> #include<conio.h> #define MAX 5 void initialize(int a[], int n); void display (int a[], int n); void input (int a[], int n); int sum (int a[], int n); int largest (int a[], int n); int smallest (int a[], int n); void main (void) { int array [MAX]; int total; initialize(array, …

Member Avatar for algoritmish
0
151
Member Avatar for bleedi

Hi, I have a little bit of a problem with my client / server apps. I'm trying to build a simple program that resembles a small instant messaging app. So far I've been working on the "user login" and "status change" parts, along with a query to get the status …

Member Avatar for nezachem
0
207
Member Avatar for moroccanplaya

[CODE] while (choice != QUIT) { choice = get_menu_choice(); if (choice == 1) { while(1)//while loop that i want to break out of { puts("please give your archive a name and a path:\n"); scanf("%s", &archive_name); if( create_pointer = fopen(archive_name, "r") != NULL) { printf("file already exists\n"); continue; } else { …

Member Avatar for sbesch
0
83
Member Avatar for divyasphoorthy
Member Avatar for Sahil12354

Can anybody temme how to run a pop up window TSR program written in C ..... m unable to create .obj file of .c file.... TC showing ERROR like " TASM.exe not found" and "Linker error".......

Member Avatar for Sahil12354
0
131
Member Avatar for asterix15

i know that the prototype of putchar() is: int putchar(int ch); eventhough its return type is int why does it print ch in character format instead of printing it as its ascii equivalent?

Member Avatar for anirudh33
0
128
Member Avatar for udaykrishnag

Where can we get fine material about OpenCL.....suggest any sites or links..

Member Avatar for WaltP
0
35
Member Avatar for moroccanplaya

i want to know how to check if the file already exists before creating the file? [CODE] puts("please enter a file name to create:\n"); scanf("%s", &file_name); create_pointer = fopen( file_name, "ab"); if( create_pointer == NULL) //create file// else { //file already exist// how would you check if the file already …

Member Avatar for WaltP
0
257
Member Avatar for Joey_Brown

Hello Is it possible to somehow place another string inside a string ? Example: char array1[4]= "!!!" char array2[5]="joey" //Replace e with array1 Output : jo!!!ey Thank you for any kind of input

Member Avatar for Joey_Brown
0
86
Member Avatar for divyasphoorthy
Member Avatar for divyasphoorthy
Member Avatar for devkc

I need an intersection program for my robot;if there is an intersection of roads,the robot should not stop or take a turn,it should follow the straight path rather than turning left or right or just stop. Please help me,its very urgent............

Member Avatar for akshaydusane
0
146
Member Avatar for abhijit (EEE)

i am using avr atmega8 microcontroller....i am getting no idea how to read the value of a pin,I have used a IR sensor in that pin.

Member Avatar for vinayakgarg
0
134
Member Avatar for enakta13

I am struck with some floating-point precision. Please help me to get through this. [CODE]main() { int fact,i=5,div=8; float dec=0.427,temp,sum=0; while(i) { temp=dec*10; printf("%f\t",temp); fact=(int)temp; sum=sum+(fact/(float)div); printf("%f\n",sum); dec=temp-fact; div=div*8; i--; } printf("\n The Decimal part= %f",sum); getch(); } [/CODE] [ICODE]Output 4.270000 0.500000 2.700000 0.531250 6.999998 0.542969 9.999981 0.545166 9.999809 0.545441 …

Member Avatar for WaltP
0
235
Member Avatar for Don_k

Hi, I would like to using POSIX API system calls in C, and via command line arguments know how to go about extracting from an archive file.(in Linux). I have done the archiving process it archives the files I enter into the command line , and the last but one …

0
120
Member Avatar for leedsfanatic

I'v written the program below, but I'v been told its too "intense" Any ideas on how I can get the same results but with a simpler program? [CODE]#define MAX_SIZE 10000 char buf[MAX_SIZE], name[1000]; int min(int a, int b) { return a<b?a:b; } int main(int argc, char** argv) { FILE *out, …

Member Avatar for peter_budo
0
114
Member Avatar for vedro-compota

Hi there)) I cann't deal with the file opening operation - [CODE]char* fpath = "D:\TC\myprog\readit.txt"; FILE* fp; fp = fopen (fpath, "r"); if (fp != NULL) printf ("\n(!) File opennig error\n"); else printf ("\n(+) File have been opened successfully!\n"); for( i=0;i<=n-1;i++) { a = getc(fp); putchar(a-48); putchar('\n'); }[/CODE] For some …

Member Avatar for vedro-compota
0
119
Member Avatar for vedro-compota

hi everyone)) Please tell me - where is the mistake here - [CODE]struct address {char* city ; char* street; int housenumb ;}; struct addinf {int age; struct address* address;}; struct student {int number; int kurs; char* name ; struct addinf* addinf;} stud; stud.number=1; stud.addinf.address.housenumb =123;[/CODE] thanks in advance)

Member Avatar for vedro-compota
0
289
Member Avatar for moroccanplaya

is it possible to copy specificity from a file for example i want to copy x number of bytes from x position to x position?

Member Avatar for Narue
0
94

The End.