C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.

learn more… | top users | synonyms

0
votes
0answers
2 views

Print class using format string in cpp

During code, I've found remarkable problem. In my code, i just print same object using fomat string. but result is not same. By my insight, i thought result is "97 97 97". but outcome is "97 98 99" ...
0
votes
0answers
1 views

How to clear buffer in recieving multiple strings?

If i enter str1 greater than length 10, rest of it remains in the buffer and gets entered into my str2. How to clear buffer before str2,so i can input it? #include <stdio.h> int main() { ...
0
votes
2answers
11 views

get memory address from user

I need a little help I use this code int *p; long b; puts("enter address:"); scanf("%l",&b); p=b; printf("%d\n",*p); the problem is p is a pointer and b is long, how I can put the address ...
-7
votes
2answers
42 views

C program to convert string [on hold]

I want a solution to a problem. Hope someone help me on this. I want to write a C program to convert a string "Corruption against India" to "India against Corruption" without using any library ...
-1
votes
1answer
40 views

what should a exist function return in c?

I have a function which should tell me if a resource exists. Should this function return 0 on exist, 1 on not-exist and -1 on an error or should it return 0 on exist and -1 on not existent /error? ...
0
votes
0answers
3 views

Dequeue iterator is not derefrencable

my basic visual c++ program opens a shared memory which has a queue of void pointer. Then I create 5 integers dynamically and put their addresses to queue. After each insert I print the size of queue ...
0
votes
1answer
17 views

return makes pointer from integer without a cast - but types are okay?

Just some code. In one file and its header: // header: extern char * thessc_config_member_get_config_key(struct config_member_t *m); // implementation: inline char * ...
0
votes
2answers
22 views

C help in using system function with batch

Hello I have a small problem with my C program. #include<stdio.h> int main ( int argc, char **argv ) { char buff[120]; char text; printf("Enter your name: "); gets(buff); ...
0
votes
1answer
18 views

C Programming - Free Method Giving me an Invalid next Size (fast) Error

I am having a Problem freeing a character pointer which is being allocated by getLine function. The Purpose of the application is to read the /proc/net/dev File and display Information about the ...
0
votes
1answer
17 views

Using libraries like boost in cuda device code

I am learning cuda at the moment and I am wondering if it is possible to use functions from different libraries and api's like boost in cuda device code. Note: I tried using std::cout and that did ...
2
votes
3answers
86 views

Why GCC didn't optimize this tail call?

I have the code working with lined lists. I use tail calls. Unfortunately, GCC does not optimise the calls. Here is C code of the function that recursively calculates length of the linked list: ...
1
vote
0answers
39 views

Serial communication between linux and windows

I am sending data bytes from linux to windows in serial RS232 then everything is ok, only i have to handle 0xa send from linux, because windows read it as 0xd + 0xa. but when i am sending data bytes ...
0
votes
2answers
19 views

BSD getmicrotime() output to Excel Date

What does C BSD getmicrotime() function returns?Does it returns epoch time in Unix? How to convert that to Excel Date Format?
0
votes
0answers
16 views

C/C++ Run/Debug configuration in Eclipse

I am new to C/C++ development in Eclipse and trying to configure Eclipse. I'm working in a Linux environment with GNU GCC and my toolchain is detected by Eclipse. As given in the Eclipse documentation ...
-1
votes
3answers
30 views

Decrementing an int while passing multiple copies in the same function call [duplicate]

I am decrementing an integer while passing it to a function. But am seeing some unexpected behavior. I'm new to C, and not sure what to make of it: #include <stdio.h> void func(int, int); int ...

1 2 3 4 5 6735
15 30 50 per page