0% found this document useful (0 votes)
2 views6 pages

Sir's Questions

The document outlines questions and topics related to computer science concepts, including compilers, algorithms, data types, and C programming. It is divided into three units, each containing 1-mark and 4-mark questions that cover theoretical and practical aspects of programming. Key topics include flow charts, variable types, control structures, and recursion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Sir's Questions

The document outlines questions and topics related to computer science concepts, including compilers, algorithms, data types, and C programming. It is divided into three units, each containing 1-mark and 4-mark questions that cover theoretical and practical aspects of programming. Key topics include flow charts, variable types, control structures, and recursion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIT - 1

1- Mark Questions
1. What is compiler & interpreter?
2. What is an assembler?
3. Define Algorithm & Flow chart?
4. What are the properties of an algorithm?

4- Marks Questions
1. Explain the computer architecture with neat block diagram?
2. Differentiate between client-server and distributed computing environments.
3. Draw the flow chart and algorithm for the below income tax problem
0 to 2,50,000 lakhs------0% TAX
2,50,001 to 5,00,000 lakhs-------10% TAX
5,00,001 t0 10,00,000 lakhs------20% TAX
Above 10,00,000 lakhs-----30% TAX
4. Draw a flow chart for reverse of a given number.
5. Draw a flow chart for given number is prime or not?

UNIT-2
1- Mark Questions
1. Define variable and Identifier?
2. Define global and local variables?
3. What is data type?
4. Define operator?
5. What is ternary operator?
6. What are different types of tokens?
7. Differentiate between pre and post increment?
8. What are left and right shift operators given examples?
9. Difference between = and == operators?
10. What is meant by dangling-else problem?
11. Write the number of tokens for the below program
main()
{
printf(“ hello welcome to c program”);
}
12. What is output for following program?
main()
{
const int a=10;
printf(“%d”, a++);
}
13. What is the output for following code?
main()
{
int a=1,b=2;
if(a=b)
printf(“hello ”);
else
printf(“bye”);
}

14. What is the output for following code?


main()
{
int a=1,b=2;
if(a==b)
printf(“hello ”);
else
printf(“bye”);
}
15. What is the output for following code?
main()
{
int a=2;
printf(“%d”,a<<<1);
}
16. What is the output for following code?
main()
{
int a=2,b=3,c=5,d;
d=a+b*c;
printf(“%d”,d);
}

17. What is the output for following code?


main()
{
int a=2,b=3,c=5,d;
d=(a+b)*c;
printf(“%d”,d);
}

18. What is the output for following code?


main()
{
int a=2,b=3,c=5,d;
d=a/b*c;
printf(“%d”,d);
}
19. What is the output for following code?
main()
{
if(10)
printf(“hello”);
else
printf(“bye”)
}

20. What is the output for following code?


main()
{
printf(“%d”,10<15?10:15);
}
21. What is the output for following code?
main()
{
switch(1)
{
case 1: printf(“ONE”);
case2: printf(“TWO”);
case 3: printf(“THREE”);
default: printf(“DEFAULT”);
}
22. What is the output for following code?
main()
{
switch(1)
{
case 1: printf(“ONE”);
break;
case2: printf(“TWO”);
break;
case 3: printf(“THREE”);
break;
default:
printf(“DEFAULT”);
}
}
23. Name the operators which have highest and lowest precedence?

4 - Mark Questions

1. List and explain features of C.


2. Explain the structure of C program with an example.
3. List and explain different types of conditional statements.
4. Explain increment and decrement operators.
5. Explain conditional operator with suitable example.
6. Write the syntax of nested of-else and explain with an example.
7. Write a C program to find roots and nature of roots of a quadratic equation.
8. In a company an employee is paid as follows :
If his basic salary is less than Rs.15000, then HRA = 10% of basic salary and DA =
90% of basic salary. If his salary is either equal to or above Rs.15000, then HRA =
Rs.5000 and DA = 95% of basic salary. The employee’s salary is input through keyboard.
Write a program to find his gross salary.

UNIT – 3

1 Mark Questions
1. Differentiate while and do-while.
2. Differentiate break and continue.
3. Define recursion.
4. What is scope of a variable?
5. What are actual and formal parameters? Give examples.
6. What is the output of the following program?
#include<stdio.h>
int i=40,j,k;
int main()
{
printf("%d",i++);
j = 1,2,3;
k = (4,5,6);
printf("\n%d",j);
printf("\n%d",k);
}
7. What is the output of the following program?
#include<stdio.h>
int i=40;
int main(){
do{
printf("%d",i++);
}
while(5,4,3,2,1,0);
return 0;
}

8. What is the output of the following program?


#include<stdio.h>
main()
{
while(0)
{
printf(“Hello”);
}
printf(“Welcome”);
}

9. What is the output of the following program?


#include<stdio.h>
main()
{
while(1)
{
printf(“Hello”);
break;
}
}

10. What will be output of following c code?


#include<stdio.h>
int main(){
for(;;) {
printf("%d ",10);
}
return 0;
}
11. What will be output of the following C program?
#include<stdio.h>
int main(){
int i;
for(i=0;i<=5;i++);
printf("%d",i)
return 0;
}

12. What is the output of the following program?


#include<stdio.h>
main()
{
while(1)
{
printf(“Hello”);
}
}

4 Marks Questions
1. List and explain different types of iterative statements (Loops).
2. What is recursion? Write a C program to find the factorial of the given number using
recursion.
3. What is call by value and explain with suitable example.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy