Just create a file pointer to the serial port com1/com2. And do operations read file and write file with small chunks of data. And about the UI(User interface ) that u can create using MFC dialog based application. Silly matter only... Thanking you Krish
krish_kumar
Posts
-
Binary data transfer through serail port -
IP StackHiii I wanna know the term "IP Stack". What does it contain? What is the purpose of it? Where it resides inside Operating system? Thanking you Krish:suss:
-
Data encapsulation in CHiii... During an interview I got a question like this A class looks like: Class A{ private: int x,y; public: getxy(int &,int &); setxy(int x,inty) } In above class functions outside the class can't access x and y, how you will do this in C language ( i.e., that is data encapsulation in C) Actually I couldn't answer this question. I think data encapsulation is possible in C, but if I say "yes" as answer then interviewer will ask how.So struggled to give an answer. Later I read somewhere data encapsulation is possible in C , and somewhere is specified that it is not possible, is only possible with oops languages.... Anyway anybody can give a good clarification....It will be useful for all Thanking you Krish
-
Can a wireless node still buffer packets when it's receiver is turned off?Or it may depend on vendor to vendor?
-
Can a wireless node still buffer packets when it's receiver is turned off?Can a wireless node still buffer packets when it's receiver is turned off? Hii .. As per my knowledge ... Normally the AP will buffer if the stations are in power save mode, by checking the mib details stored in AP. So if the receiver is turned off, the AP mib information doesn't conatin the details about that particular station. So it won't buffer the packets for that station.This is my answer...If this is correct or not.....??? Thanking you Krish :thumbsup::thumbsdown:
-
Can a wireless node still buffer packets when it's receiver is turned off?Can a wireless node still buffer packets when it's receiver is turned off? Hii .. As per my knowledge ... Normally the AP will buffer if the stations are in power save mode, by checking the mib details stored in AP. So if the receiver is turned off, the AP mib information doesn't conatin the details about that particular station. So it won't buffer the packets for that station.This is my answer...If this is correct or not.....??? Thanking you Krish :thumbsdown:
-
If the data is static, how can you access that data in another file ?Could you elaborate it , please?
-
If the data is static, how can you access that data in another file ?Hello Question : Differentiate static and extern ? If the data is static, how can you access that data in another file ? My answer is : The static keyword allows a variable to maintain its value among different function calls. Extern says the variable, or function, is defined outside this source file. main.h -------- #include <> static int x; main.c -------- #include "main.h" int main(void) { printf("\n x is %d", x); return 0; } My answer is sufficient or partially or wrong ...? Give me an advise ? Thanking you.
-
Check for validity of IP address [modified]Google gives the solution in php program, but I want in c-code
-
Check for validity of IP address [modified]Hello I need the c code to perform the following task "Given an IP address, check for validity of IP address". Suppose the ip address is 172.16.10.61. So it is a valid address. Here to check it by taking separately each byte and check the range( 0-255) ( for exapmle using strtok(ipaddress, ".") ).I work in a fedora Linux 11. Instead of using the strtok on ip address string any direct library function is there? Thanking you, Krishna:rose:
modified on Thursday, March 25, 2010 8:51 AM
-
Create a gui for linux.of course:thumbsdown:
-
Create a gui for linux.Ok.... in Qt we program in C++...at any time , if I wanna attach any C- codes, whether it makes any complication or not.Actually I know something about qt, I've created small GUI's like small dialog widgets and all.. So according to you continue with qt is best.!!! Anyway thank you. Krishna:rose:
-
Create a gui for linux.Hiii... I wanna create a Gui like windows operating system for Linux. The latest Linux versions are user friendly .But I want to do this as a mini project just for practice. So my aim is a simple gui for Linux. And there are so many gui development tools like gtk, Kdevelopr, Qt/...etc. Which one I've to select , which one is better for my need. Presently I use Fedora 11. Wait for a reply... thanking you KRISHThumbs Down
-
Create a gui for linux.Hiii... I wanna create a Gui like windows operating system for Linux. The latest Linux versions are user friendly .But I want to do this as a mini project just for practice. So my aim is a simple gui for Linux. And there are so many gui development tools like gtk, Kdevelopr, Qt/...etc. Which one I've to select , which one is better for my need. Presently I use Fedora 11. Wait for a reply... thanking you KRISH:thumbsdown:
-
create message queuesI think that structure is defined in #include
-
create message queuesI can't understand the question?
-
create message queuesHiii.. I try to create message queue Inter process communication mechanism, a small program. Here is my code. // struct msgbuf // { // long int mtype; /* type of received/sent message */ // char mtext[1]; /* text of the message */ // }; /* MESSAGE QUEUES EXAMPLE */ /*------------------------*/ #include #include #include #include #define MSG_KEY 1000 pthread_t threadid; void* MsgDSndThread(void* arg) { struct msgbuf *snd = (struct msgbuf *)malloc(16); key_t fd; snd->mtype = 1; strcpy(snd->mtext, "message"); fd = msgget(MSG_KEY, IPC_CREAT); msgsnd(fd, snd, 12, 0); free(snd); return 0; } void CreateThreadL() { pthread_create(&threadid,(pthread_attr_t *)NULL,MsgDSndThread, NULL); } int main() { struct msgbuf *rcv = (struct msgbuf*)malloc(16); key_t fd = msgget(MSG_KEY, IPC_CREAT); CreateThreadL(); msgrcv(fd, rcv, 6, 0, 0); msgctl(fd, IPC_RMID, NULL); free(rcv); return 0; } But while compiling showing some errors..... like test.c: In function 'MsgDSndThread': test.c:23: error: dereferencing pointer to incomplete type test.c:24: error: dereferencing pointer to incomplete type How to clear these errors... With regards KRISH+:cool:
-
multiple definition of.....hii Here I give my header file and .c file /* main.h*/ #include #include struct linked_list{ int data; struct linked_list *next; }; typedef struct linked_list node_t; void display (void); node_t *root = 0; ---------------------------------------------------------------------- /* display.c */ #include "./../inc/main.h" extern node_t *root; void display ( ) { node_t *temp = root; while (temp -> next != root) printf(" %d", temp->data); } ---------------------------------------------------------------------------- while compiling it gives this error qs2/src/display.c:8: multiple definition of `root' obj/create.o:/qs2/src/create.c:6: first defined here obj/display.o: In function `display': I think this error reltes to node_t *root = 0; ,extern node_t *root; but I dont know how to clear it ...??? seeking help ...!! Thnaking you
-
what is the difference between ..?Hiiii to all I wanna know the difference between the return(0); return 0; return; from a function call...... return(0) and return 0 is same or not ?? Thanking you -------------- :rolleyes: :rolleyes: :rolleyes:
-
Why does it print junk characters ?The following code snippet read data from keyboard and write into one file; and read that file and display it on screen....But it displays junk characters.... What may be the problem ...? // main.c #include int main(void){ char ch; FILE *fp; fp = fopen("test_file_src","w"); printf("\n Eneter the data (type Ctrl^D at end :\n"); if (fp != NULL) { while(ch = getchar() != EOF) fputc(ch ,fp); } else { printf("\n Unable to create file \n"); } fclose(fp); printf("\n\n Reading from file\n\n "); fp = fopen("test_file_src","r"); if (fp != NULL) { while(!feof(fp)) { // Move up to end of file ch = fgetc(fp); putchar(ch); } } else { printf("\n Unable to process file \n"); } fclose(fp); // Close file printf("\n\n\n"); return 0; } /* Output Enter the data (type Ctrl^D at end : 11111111111111222 2222222222222222222 22222222222222222 Reading from file