Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

main()

{

char *p;

p="%d\n";

p++;

p++;

printf(p-2,300);

}

main() { char *p; p="%d\n"; p++; ..

300

Explanation:

The pointer points to % since it is incremented twice and
again decremented by 2, it points to '%d\n' and 300 is printed.

 Is This Answer Correct ? 8 Yes 0 No

More C Code Interview Questions

How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com

#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.

To reverse an entire text file into another text file.... get d file names in cmd line

What is data _null_? ,Explain with code when u need to use it in data step programming ?

main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4

main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }

how to check whether a linked list is circular.

How to count a sum, when the numbers are read from stdin and stored into a structure?

Write a program that find and print how many odd numbers in a binary tree

All the combinations of prime numbers whose sum gives 32

C statement to copy a string without using loop and library function..

Categories
• C Code (422)
• C++ Code (128)
• VC++ Code (17)
• Java Code (84)
• Dot Net Code (114)
• Visual Basic Code (11)
• Programming Code AllOther (62)