Although I have solved my question, but while doing so I came across unexpected behaviour of \t. where I'm getting different tab length for single \t.Here is my code:
#include<stdio.h>
int calculate_intpart_qutent(int dividend, int diviser);
int main()
{
int a;
int b;
int choice;
do
{
printf("Enter the Dividend (a) :\t");
scanf("%d", &a);
printf("\nEnter the Divisor (b) :\t");
scanf("%d", &b);
printf("\n\nThe quotient is:\t%d", calculate_qutent(a, b));
printf("\n\nDo you want to try again?(Y\\N):\t");
choice = getchar();
if (choice == '\n') choice = getchar();
printf("\n\n\n");
} while (choice=='y'|| choice=='Y');
}
int calculate_intpart_qutent(int dividend, int diviser)
{
return (dividend/diviser);
}
Here is my output:
Since I have used single tab in both of the first printf statements, why I'm getting different tab length on my output screen? I'm I doing something wrong here?
I'm using Visual Studio 2017 RC.