Viva Questions for Your Program
Examiners ask about your own program, not textbook trivia: why a variable starts at 1, what happens for 0 or a negative number, why the loop stops where it does. Paste your code and get 6–8 such questions with answers you can say aloud, plus the flowchart and dry run to revise from.
- Questions about your program’s own lines and variables
- Edge inputs: 0, 1, negative numbers, empty input
- The concept behind it and its time complexity
- A “what would change if…” question
- Answers in one or two plain sentences
- Added to your lab record download
How it works
- Paste your code
- Press ✦ Make flowchart
- Open 🎓 Viva questions and press ✦ Write viva questions
- Click a question to see its answer
Try it with
- #include <stdio.h> int main() { int n, i, isPrime = 1; scanf("%d", &n); if (n < 2) isPrime = 0; for (i = 2; i * i <= n; i++) if (n % i == 0) { isPrime = 0; break; } printf(isPrime ? "Prime" : "Not prime"); return 0; }
- n = int(input()) original, rev = n, 0 while n > 0: rev = rev * 10 + n % 10 n = n // 10 print("palindrome" if original == rev else "not palindrome")
- int[] a = {5, 1, 4, 2}; for (int i = 0; i < a.length - 1; i++) for (int j = 0; j < a.length - 1 - i; j++) if (a[j] > a[j + 1]) { int t = a[j]; a[j] = a[j + 1]; a[j + 1] = t; }
Frequently asked questions
How many questions do I get?
6 to 8, easiest first, each with a one or two sentence answer. Writing them uses one AI credit.
Are the questions about my exact code?
Yes. They refer to your variables, conditions and lines, plus the concept behind the program and its complexity.
Are there viva questions for common programs?
Yes. Every program in the programs library (prime number, factorial, Fibonacci, sorting and more) already has 8 viva questions with answers.
Can I export it?
Yes — PNG, SVG, PDF, PowerPoint with an editable slide, Mermaid code and draw.io. You can also share a live link or present it full screen.
Classic programs with flowchart, algorithm and code
- Prime Number Check: flowchart, algorithm and program
- Factorial of a Number: flowchart, algorithm and program
- Fibonacci Series: flowchart, algorithm and program
- Palindrome Number: flowchart, algorithm and program
- Armstrong Number: flowchart, algorithm and program
- Reverse a Number: flowchart, algorithm and program
- Sum of Digits: flowchart, algorithm and program
- Leap Year: flowchart, algorithm and program
- Largest of Three Numbers: flowchart, algorithm and program
- Bubble Sort: flowchart, algorithm and program
- Binary Search: flowchart, algorithm and program
- Factorial Using Recursion: flowchart, algorithm and program
- All 88 programs →