Commonly Asked C Programming Interview Questions

1. What are different storage class specifiers in C?
2. What is scope of a variable? How are variables scoped in C?
3. How will you print “Hello World” without semicolon?
4. When should we use pointers in a C program?
5. What is NULL pointer?
6. What is Dangling pointer?

Do you know more? Do you know answer of each basic question? Share your information.

my codes:

int main () {


return 0;

after building, it report
"error: implicit declaration of function 'textmode' is invalid in C99

I don't know why? how to use textmode function on c? Hope have guys can solve this problem.
Many thanks :).

I am wondering where there is an official explanation
of the syntax of function declarations, including functions
which include as arguments pointers to functions and which yield pointers to functions ?

If I wanted to declare a function which takes an integer and yields a
pointer to a function of integers:

void ( *function(int n))(int)

Or a function which takes a pointer to a function of integers and yields an integer:

int function(void (*f)(int))

Or a pointer to a function which takes a pointer to a function of integers and yields an integer

int (*function) ( void (*f)(int))

Is this all correct ?

But what if I wanted a function which takes a pointer to a function of integers and yields a pointer to integers ?

The code of Kerrisk's book works with gcc on a jailbroken iPod !
Of course I did not use the included makefiles (which do not in fact work) but compiled only what I wanted manually (making sure to include in the gcc command everything that is needed), which is much more fun as I can always change and recompile individual .c files.

For instance, after unpacking the file, if I want to compile the ouch.c file I make a copy and put it in the lib folder.
Then in that directory I run:

gcc -std=c99 -o ouch ouch.c get_num.c error_functions.c

When I run it my iPod prints out ^COuch ! when I press control-C both through ssh and directly in the mobile terminal.
I would love to hear opinions about the book

Hello everyone. My question: Does anybody know some program for test-suites creation like DejaGNU, but working with X11 (e.g., grab mouse, keyboard and timer events, among others) ? Thank you

Post has attachment
This wonderfully clear book explains everything I ever wanted to know about the inner workings of Linux and C :

Thanks to this book I can now begin to understand the C code
of some Linux exploits such as the ones involving privilege escalations on Ubuntu.

Post has attachment
C++ London Uni with Tom Breza, Oliver Ddin and Tristan Brindle. Now with over 20 years of experience, Tom set his mind on new challenges and decided to learn software development, specifically C++ and helps others to learn through C++ London Uni. Oliver has been a C++ hater since 2008 - fortunately, that all changed with C++11 and he's firmly an enthusiast now. He's spent his time doing everything from embedded devices to network engineering and now Internet security related endeavours. Tristan is an independent contractor and C++ enthusiast based in London. He’s particularly interested in standardisation and making C++ an easier #cppcast #cpp language to use and teach.

5 Ways You can Learn Programming Faster

1. Look at the Example Code
2. Don't Just Read Example Code--Run It
3. Write your Own Code as Soon as Possible
4. Learn to Use a Debugger
5. Seek out More Sources

Can you suggest more? If yes, please leave your comment. Thanks!

Post has attachment
Found an issue with a free C JSON parser called tiny-json, emailed the programmer, had a fix within 6 hours. That's why #opensource rules. Thanks Rafa.

What happens if we call the main function in a user defined function in C?

{ printf("Hello "); }

{ main() }

What is the output of the program?
Wait while more posts are being loaded