Top "C" questions

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform.

main() function in C

I've been learning C programming in a self-taught fashion for some weeks, and there are some questions that I have …

c main
C: Multiple scanf's, when I enter in a value for one scanf it skips the second scanf

I have this block of code (functions omitted as the logic is part of a homework assignment): #include <stdio.…

c scanf
What does the brk() system call do?

According to Linux programmers manual: brk() and sbrk() change the location of the program break, which defines the end of …

c linux unix memory-management brk
How to display a progress indicator in pure C/C++ (cout/printf)?

I'm writing a console program in C++ to download a large file. I have known the file size, and I …

c++ c user-interface c++11 io
Difference between long double and double in C and C++

Possible Duplicate: long double vs double I am new to programming and I am unable to understand the difference between …

c++ c long-double
Reading a single character in C

I'm trying to read a character from the console (inside a while loop). But it reads more than once. Input: …

c scanf
Why use bzero over memset?

In a Systems Programming class I took this previous semester, we had to implement a basic client/server in C. …

c memset systems-programming
What's the difference between a file descriptor and file pointer?

I want to know the difference between a file descriptor and file pointer. Also, in what scenario would you use …

c file-descriptor file-pointer
Where is the C auto keyword used?

In my college days I read about the auto keyword and in the course of time I actually forgot what …

c
practical examples use dup or dup2

I know what dup / dup2 does, but I have no idea when it would be used. Any practical examples? Thanks.

c file unix system-calls dup