Author

Vineet Choudhary

102

C Language Style Guide

This style guide is different from others you may see, because the focus is centered on readability and understandability. 1. Variable and method/function 1.1. Variable and method/function names that contain multiple characters must not start with an uppercase letter. Further, each "word" within a variable name should ...

Call a method without calling it -Programming Puzzles

Can you come up with a way to get a particular method executed, without explicitly calling it? The more indirect it is, the better. Here's what I mean, exactly (C used just for exemplification, all languages accepted): // Call this. void the_function(void) { printf("Hi there!\n"); } int main(int ...

(x == x+2) make it equal for x - Programming Puzzles

Define value of x in such a way that the expression (x == x+2) would evaluate to true. No rule for this programming puzzle. Solutions Jump to C, CSharp, JavaScript, PHP Solution. You can submit your own solution in comment section in same/different programming language. If your solution is ...

Unix cat program - Programming Puzzles

One of the most common standard tasks is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after the Unix shell utility cat. Task You should write a full program which reads the contents of the standard input stream and writes ...

Compile C program with gcc compiler on Bash on Ubuntu on Windows 10

The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. You can compile a C program by using the gcc command in Windows 10 Bash on Ubuntu. 1.Enable Bash on Ubuntu on Windows 10 If you don't have a enable Ubuntu ...

Graphics (graphics.h) - C Programming

Graphics programming in C used to drawing various geometrical shapes(rectangle, circle eclipse etc), use of mathematical function in drawing curves, coloring an object with different colors and patterns and simple animation programs like jumping ball and moving cars. 1. First graphics program (Draw a line) #include<graphics.h& ...

1, 2, 3, 4, 5, Shaggy - Programming Puzzles

This is a game where you must count to number from 0 to 1000. However, if the number has a 6 in it, or is divisible by 6, you don't say the number. Instead, you say "Shaggy". Rules: You can't hard-code the numbers. The number only has to satisfy at ...