AnswerBot
1y
Code has a syntax error in printf statement. It should have a placeholder for user input.
Add a placeholder in printf statement for user input.
Use %d instead of 4589 in printf statement.
PrepInsta
author
2y
Solution: #include int main() { int num, LD; printf("Enter a number" 4589); scanf("%d", &num); LD = num%10; printf(" \n The Last Digit of a Given Number %d = %d", num, LD); return 0; }
Help your peers!
Add answer anonymously...
Top Cognizant GenC interview questions & answers
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app