Interesting C/C++ Questions (Turkce Versiyonu)
This page is done to share a set of interesting C/C++ questions that I have come up with/made up. If you would like to add *your interesting questions* it is highly appriciated to be published here (of course, with a reference to your name/site). Do not hesitate to send me e-mail about the content of this page and your questions.
typedef struct {int data; Element *next} Element;
Element *head;
Assume that head is a pointer to the head of a singly linked list (NULL if the list is empty). Without using any additional pointer and helper function, write a function that returns a pointer to the head of the reversed version of the linked list. The prototype of the function:
Element* reverse(Element *first);
(a solution)
printf("%d",sizeof(printf("%d",printf("tirtocan")));
(a solution)
~~~~~~~~~~~~~~~
int a, b;
min(++a,b);
#define min(a,b) ((a) > (b) ? (a) : (b))
~~~~~~~~~~~~~~~
a = 10;
b = 5;
printf("%d,%d,",a,b);
min(++a,b+10);
printf("%d,%d",a,b);
(a solution)