15,552 Topics
| |
i couldnt understand how fseek(fp,-size,SEEK_CUR) helps to allocate the modified data at the location where name are found to be same. it would be great help how fseek points to the location where data is going to modified. -size if fseek logic of pointing to the location where to modify … | |
I am studying in college and got stuck with an excercise in my book, should be simple but I insist of making life hard :p Mission: My code was sopoused to take a binary number with use of functions I have recently learned and mve all the digits to the … | |
ptrdiff_t is signed, while size_t is not, but both can safely hold the address of a pointer. How is it possible when half the possible values of ptrdiff_t will be negative, so its capacity must be half of that of size_t when it comes to storing pointers, as pointer adresses … | |
Hello there. :) I tried all day yesterday to figure out what was wrong with this code so I thought I'd ask here. I have to write a program that duplicates a 24-bit (RGB) bitmap file while also inverting the image. The only problem seems to be copying the pixel … | |
Hi. im just quite new to c program and i need help on who can give me the source code. This is about Interval search method or OSM in numerical method analysis. The program should solve a given equation f(x) example: f(x)= x^2+2x+3 Given the function f(x)=0 (this would be … | |
I have a general doubt regarding passing pointers to functions... Suppose i have variable [code=c]tc_struct *ptr;[/code] and i want to pass it to a function to fill it. So i passed it [code=c]func(&ptr);[/code] and i received it in func as [code=c]void func(tc_struct** ptr1)[/code] Now again i want to pass this … | |
There is a rule about sequence point that goes like this. "Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored." … | |
I think getch() is the most primitive input function of C, on which getchar(),etc. are based. What may be happening is that getchar() uses getch() to take input, and keeps buffering it till getch() returns 26 (ascii for ctrl+z, which indicates the end of input in Windows) is encountered. It … | |
size_t is defined as "size_t type is a base unsigned integer type of C/C++ language. It is the result of sizeof operator's execution. The type's size is chosen so that it could store the maximum size of a theoretically possible array. On a 32-bit system size_t will take 32 bits, … | |
Hello. I'm writing a program in C that should ask for a line of input, and extract the process name and parameters. This doesn't have to be totally bulletproof at this point. An example input could be: "Hello these are parameters". On this example "Hello" would be the string i … | |
someone please help me out on this linked list code. it seems not to work out. it is sort of a doubly linked list. look it out. [CODE] #include<stdio.h> #include<stdlib.h> int count = 0; struct node_ptr{ int value; int no; struct node* back; struct node* next; }; struct node_ptr* root; … | |
in my project if a student gives login and password he should get the details of the student as well as placements detalis which we put the database in some files | |
I just made a 'Hello World' program [code] #include<stdio.h> int main() { printf("Hello World\n"); return 0; } [/code] [code] exe file size = 15.5 KB Source file size = 79.0 B [/code] Then i made a data structure program (implementing stack, queue, deque) [code] exe file size = 21.9 KB … | |
Greetings all! I have a question which after hours of googling i could not find an answer to. In a winsock enviroment, how does one get the udp packet's checksum from the header? thanks! | |
Hi , so far i have been concentrating on programming aspects. now its time to learn some internals of C -compiler. Lexical Analyzer Parser Hashtables Syntax Checkers Expression Evaluators Symbol table : etc please share me some info related to symbol table what are the contents of the symbol table … | |
Basically what is the system level difference between language C and C++ ? | |
[CODE] while(1){ system("clear"); gotorc(10,30); printf("\n1. add records"); printf("\nyour choice"); fflush(stdin); choice=getchar(); switch(choice) { case'1' : fseek(fp,0,SEEK_END); another='y'; while(another=='y') { printf("\n Enter name, age and basic sal"); scanf("%s%d%f",e.name,&e.age,&e.bs); fwrite(&e,stsize,1,fp); printf("\n add another record(y/n)"); fflush(stdin); another=getchar(); } break; [/CODE] [QUOTE] hi friends i am working on one menu driven program and used … | |
Hi all, I was trying to write a C program which round off the decimal number, here main intension is decimal digits can be of N digits. So problem I was facing to get last digit on which I have to take decision. Please check below C code - suppose … | |
Hello guys, I'm trying to make this work [CODE]all: daemon client daemon: cd ./daemon; make daemon client: echo going in cd ./client; make client clean: cd ./daemon ; make clean cd ./client ; make clean[/CODE] But I'm having 2 problems: 1) Make ALWAYS tells me there's nothing to be done. … | |
[QUOTE] fwrite writes only name from the structure emp and rest of them are written garbage value to the file. so it would be really great if any one of you can help me out[/QUOTE] [CODE] #include<stdio.h> #include<string.h> #include<stdlib.h> int main(){ FILE *fp; char another,choice,useme; struct emp { char name[40]; … | |
Please I have a little problem with my project. It goes "A polynomial of degree n is represented as Pn(x)=A0 + a1x + a2x2 + … + anxn Where a0, a1, a2, a3 , … , an are constant coefficients. Evaluation of such polynomials may be important if Pn(x) is … | |
One day while pondering about C I came up with this program. Can you predict what the answer will be? Now run it, were you right? filename.c [CODE] #include <stdio.h> #include <stdlib.h> int main(int argc, char**argv) { unsigned long *iptr = (unsigned long*)0;/*pointer equals 0*/ unsigned long ans = (unsigned … | |
| Hi, I am trying to make a sublime text plugin to compile C using a make file, unfortunately it is all in python and I cannot get things to work :( could you please give me advice on passing data to the g++ make command? Thanks in advance. |
Hello, Im using threads in a recent project. I would like to know whats the difference between: pthread_kill() and pthread_cancel() What are the effects of each one? Thank you! | |
Hi every one, I m doing some work in fractal image compression, plz tell me how to convert a c code to matlab code | |
Gentlefolk, Totally new to the world of C C++, compilers and linkers. I am attempting to compile and build some demonstration application code which access BlueTooth devices. Have all the .C, .H files, also a .lib. Using the LCC c ide-compiler-linker, etc on Windows-32 Compile one module - no errors. … | |
I have been working with popen to run iwlist and get essid from the output but that is making the code sloppy. Is there an API I could use instead to get SSID and other information? Iwlist is in the package wireless-tools in linux Thanks. | |
hi all!!!! im trying to do strcmp to a char in a structure and and char* and im getting a msg error: dereferencing pointer to incomplete type.... can somebody explain me what is that and give me an idea how to resolve it? thanx in advanced! | |
In undefined cases, anything can happen, the program can crash, or unexpected results be thrown up. What happens is up to the compiler. In unspecified cases, the Standard has deliberately not defined the exact behaviour of a few things so that the compiler is at liberty to do as it … |
The End.