C Programming
What will be the output of the below C program.?
![]()
Practice Expressions – What will be the output of the below C program.?
#include
int main()
{
int i=i++,j=j++,k=k++;
printf("%d%d%d",i,j,k);
return 0;
}What will be the output of the below C program.
![]()
Practice Variable Number of Arguments – What will be the output of the below C program.
#include
int main()
{
static int i=5;
if(--i){
main();
printf("%d ",i);
}
return 0;
}What will be output of the following “c” code?
![]()
Practice Expressions – What will be output of the following “c” code?
#include
long fu(int);
char vect[]={1,2,3,4,5};
void main(){
int i=1;
i=fu(++i)+ ++vect[++i]+ ++i+fu(i++);
printf("%d",i);
}
long fu(int x){
return x*3;
}What is the output of the following C Program?
![]()
Practice Basic Concept – What is the output of the following C Program?
#include
int main()
{
printf("ab");
printf("si");
printf("
ha");
return 0;
}What will be output of the following “c” code?
Note: 32 b
![]()
Practice Variable Number of Arguments – What will be output of the following “c” code?
Note: 32 bit compiler
#include
int main(){
float **(*ptr)[4]=(float **(*)[4])0;
ptr+=5;
printf("%d %d",ptr,sizeof ptr);
return 0;
}What will be output of the following “c” code?
![]()
Practice Control Instructions – What will be output of the following “c” code?
void main()
{
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++) {
printf(" %d ",*c);
++q;
}
for(j=0;j<5;j++){
printf(" %d ",*p);
++p;
}
}What will be the output of the following program?
![]()
Practice Declarations and Initializations – What will be the output of the following program?
#include
#define max
int main(){
printf("%d",max);
return 0;
} ![]()
Practice Functions – What is the output of the following problem ?
#include
int main() {
int factorial(int n);
int i,ans;
ans = factorial(5);
printf("
Factorial by recursion = %d
", ans);
return 0;
}
int factorial(int n)
{
if (n <= 1)
return (1);
else
return ( n * factorial(n-1));
}