Write a single line c expression to delete a,b,c from aabbcc
Answers were Sorted based on User's Feedback
Answer / shirley
in arrays:
char a[6]="aabbcc";
for(i=0;i<3;i+=2)
a[i]=a[i+2];
a[i+1]='\0';
using pointers:
*s="aabbcc"
for(i=0;i<3;i++)
*(s+i)=*(s+i+2);
*(s+i+1)='\0';
Is This Answer Correct ? | 10 Yes | 7 No |
Answer / arihant jain
printf("%s\b\b\b\b\b\b \b\b\b\b\b\babc","aabbcc");
Is This Answer Correct ? | 5 Yes | 2 No |
main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā%dā, i); }
Write a C program to add two numbers before the main function is called.
how to concatenate the two strings
main() { int i =0;j=0; if(i && j++) printf("%d..%d",i++,j); printf("%d..%d,i,j); }
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
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 Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number