GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Your output is producing less number of lines than expected!!! Maybe you are missing new line character. Need Help ?

#include<stdio.h>
int main()
{
int t,i=0;
char a[50];
//clrscr();
//printf("enter no. of test cases:");
scanf("%d",&t);
if(t>=1&&t<=100){
while(t--){
//flushall();
//printf("enter string:");
scanf("%[^\n]",a);
for(i=0;a[i]!='\0';i++)
{
if(a[i]>=97&&a[i]<=122)
{
a[i]=a[i]-32;
}
}
for(i=0;a[i]!='\0';i++)
{
printf("%c",a[i]);
}
}
printf("\n");
}
return 0;
}

 

asked Feb 21, 2017 by deekshag999
...