-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Decrement operator in C
int a=3,y;
y=++a + a+++ --a+ ++a;
printf("%d%d",y,a);
Why value of y become 16. -
Removing duplicate words from a string
cint main()
{
char arr[1000];
char *temp=NULL;
char *temp1=malloc(100);
int len;
printf("enter the string:
");
gets(arr);
len=strlen(arr);
puts(arr);
printf("len:%d
",len);
temp=strtok(arr," ");
if(temp!=NULL)
strcpy(temp1,temp);
while(temp!=NULL)
{
temp=strtok(NULL,"... -
-
-
-
C Interview Questions
Ans