Sample Questions by PTK
Sample Questions by PTK
a)High Level
b)Low Level
c)Middle Level
b) ;
c) %
d) $
a)int
b) char
c) float
main()
int a=10;
int b;
b=a++ + 20;
printf("a=%d b=%d",a,b);
b) a=11 b=30
c) a=10 b=30
d) a=11 b=31
a) scanf
b) printf
c) Both A and B
main()
int exf=25;
int test;
test=++exf++;
a) exf=26 test=25
b) exf=27 test=26
c) Gives Error
d) exf=26 test=26
a) exforsys
c) abcd
a) \n
b) /n
c) t
d) /t
a) long double
b) char
c) float
d) double
#include<stdio.h>
int main(){
int num,a=5;
num=++a;
printf("%d %d",num,a);
return 0;
(A)5 5
(B)6 6
(D)5 6
#include<stdio.h>
int main(){
int i=1,j=2,k=3;
if(i==1)
if(k==2)
if(j==3){
printf("ok");
else
printf("bye");
return 0;
(A) ok
(B) bye
(C) okbye
A. 3
B. 5
C. 7
A. 3
B. 5
C. 9
D. 8
c) c=+5; d) c++;
15. Which statement will decide whether the number is an even number or not?
a) if (num=0) b) if (num%2)
c) if (num%2= =0) d) if (num%2= =1)
Part 02
Eg: what are the variables and data type, functions, conditions, etc…?
#include <stdio.h>
#include <conio.h>
char name[20];
int x,m;
clrscr();
scanf("%d",&x);
scanf("%s",name);
printf("enter marks:");
scanf("%d",&m);
printf("\nmarks: %d",m);
if(m>=80){
printf("\nGRADE A");
else if(m>=60){
printf("\nGRADE B");
else if(m>=50){
printf("\nGRADE C");
printf("\nGRADE S");
else if(m<40){
printf("\nGRADE F");
getch();