
AnswerBot
2y
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
3y
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...
Cognizant GenC interview questions & answers
A GenC was asked 1w agoQ. How willing are you to adapt to new technologies?
A GenC was asked 2w agoQ. What is the difference between delete and truncate?
A GenC was asked 2w agoQ. What is the self keyword in Python?
Popular interview questions of GenC
A GenC was asked 1w agoQ1. How willing are you to adapt to new technologies?
A GenC was asked 2w agoQ2. What is the self keyword in Python?
A GenC was asked 2w agoQ3. Explain the concepts of OOP.
Top HR questions asked in Cognizant GenC
A GenC was asked 5mo agoQ1. Can you tell me about yourself?
A GenC was asked 6mo agoQ2. Can you explain your project in detail?
A GenC was asked 7mo agoQ3. Tell me about your projects.
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

