Here are some interesting tricky c programs that will be a brain exercise for you if you take them as challenge.
If you have solutions please share them with us by commenting below..
Program 1:
Create a Program which produce output "Hello World" , the program must not contains semicolon ; in other word any statement of the program will not have a termination semicolon.
Create a Program which produce output "Hello World" , the program must not contains semicolon ; in other word any statement of the program will not have a termination semicolon.
Program 2:
Write a C or C++ program which run without main() function or in other word we can say the function should not have any function named main().
Write a C or C++ program which run without main() function or in other word we can say the function should not have any function named main().
Program 3:
Write a C program which takes one integer number from user and then checks whether number is Even or Odd without using Modulus (%) and Division (/) operator.
Write a C program which takes one integer number from user and then checks whether number is Even or Odd without using Modulus (%) and Division (/) operator.
Program 4:
C program which creates numeric array num and print its value like 1[num], 2[num], 3[num]...n[num] check will it run.
C program which creates numeric array num and print its value like 1[num], 2[num], 3[num]...n[num] check will it run.
#include <stdio.h>#include <stdlib.h>#define hand ma##inint hand(int argc, char *argv[]) {if (printf("Hello, world!\n")||scanf("%d",&argc)){}if (argc&1){if(printf("Even")){}}else {if(printf("Odd")){}}while (exit(0),0[argv]){}}
If you have solutions please share them with us by commenting below..

ConversionConversion EmoticonEmoticon