July 7, 2021 in C and CPP
Explain the difference between text mode and binary mode files.
b) Explain the difference between text mode and binary mode files.
July 7, 2021 in C and CPP
b) Explain the difference between text mode and binary mode files.
July 7, 2021 in C and CPP
a) Enumerate the difference between:
i) structures and union
ii) union and enum
July 7, 2021 in C and CPP
b) Write a program to find greatest number in an array.
July 7, 2021 in C and CPP
a) Assume following code:
int dat = 100;
int *var
var = &dat;
Here dat is an integer variable and var is a pointer. Answer the output of the following
statements, in this regards and explain your answer.
i) printf(“%d”, * var);
ii) printf(“%d”, (* var)++);
iii) printf(“%d”, var);
iv) printf(“%d”, -var);
July 7, 2021 in C and CPP
c) Assuming ip is a pointer; explain the function of following statements:
i) ip = ip + 5;
ii) ip = ip – 10;
iii) ip –
iv) *ip++
v) *ip –
July 7, 2021 in C and CPP
b) Write a program using pointer to find greatest number in an array.
July 7, 2021 in C and CPP
a) Explain the difference between logical and bitwise operator.
July 7, 2021 in C and CPP
c) Explain the following:
i) static variable
ii) auto variable
iii) register variable
July 7, 2021 in C and CPP
b) Describe output of following program:
#include<stdio.h>
main()
{ auto int i=10;
{ auto int i=5;
printf(“%d”, i);
}
printf(“%d”, i+s);
printf(“%d”i);
July 7, 2021 in C and CPP
a) Explain the function performed by following library function of ‘C’:
i) getch
ii) getche
iii) getchar
iv) putchar
v) putch