What will be output of the following “c” code?
Practice Declarations and Initializations – What will be output of the following “c” code?
#include
void main()
{
100;
printf("%d",100);
}
Practice Declarations and Initializations – What will be output of the following “c” code?
#include
void main()
{
100;
printf("%d",100);
}
Practice Declarations and Initializations – What is the output of the following program ?
void main()
{
printf(“%d”,10?0?5:1:12);
}
Practice Declarations and Initializations – What will be the output of the following program?
#include
#define max
int main(){
printf("%d",max);
return 0;
}
What will be the output of the following program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the following program on GCC compiler?
#include<stdio.h>
int main() {
unsigned int a=0xffff;
~a;
printf("%x
", a);
return 0;
}
What will be the output of the program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the program on GCC compiler?
#include<stdio.h>
int main() {
float a = 0.7;
if(0.7 > a){
printf("Hi
");
}
else {
printf("Hello
");
}
return 0;
}
What will be the output of the following program on GCC?
Practice Declarations and Initializations –
What will be the output of the following program on GCC?
#include <stdio.h>
int main(){
char j=1;
while(j<=255){
printf("%d,",j);
j = j + 1;
}
return 0;
}
Practice Declarations and Initializations –
Find the output on a 64 bit GCC compiler.
# include<stdio.h>
int main(){
int a=0;
{
int a=10;
printf("%d",a);
a++;
{
a=20;
}
{
printf(" %d",a);
int a=30; {a++;}
printf(" %d",a++);
}
printf(" %d",a++);
}
printf(" %d",a);
return 0;
}
What will be the output of the program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the program on GCC compiler?
#include<stdio.h>
int main() {
float a=0.7;
if(a < 0.7){
printf("C
");
}
else {
printf("C++
");
}
return 0;
}
What will be the output of the following program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the following program on GCC compiler?
#include<stdio.h>
int main() {
float f=43.20;
printf("%e, ", f);
printf("%f, ", f);
printf("%g", f);
return 0;
}
What will be the output of the following program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the following program on GCC compiler?
#include<stdio.h>
#include<math.h>
int main() {
printf("%d, %d, %d
", sizeof(3.14f), sizeof(3.14), sizeof(3.14l));
return 0;
}
What will be the output of the following program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the following program on GCC compiler?
#include<stdio.h>
#include<math.h>
int main() {
printf("%f
", sqrt(36.0));
return 0;
}
What will be the output of the following program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the following program on GCC compiler?
#include <stdio.h>
int main() {
float f=7.29;
printf("%d
", (int)f);
return 0;
}
What will be the output of the program on GCC compiler?
Practice Declarations and Initializations –
What will be the output of the program on GCC compiler?
#include<stdio.h>
int main() {
float a=0.7;
if(a < 0.7){
printf("C
");
}
else {
printf("C++
");
}
return 0;
}
What will be the output of the following program on GCC?
Practice Declarations and Initializations –
What will be the output of the following program on GCC?
#include <stdio.h>
int increment();
int num;
int main(){
int i,j;
for(i=1;i<=3;i++){
j=increment();
printf("j=%d
",j);
}
printf("num=%d
",num);
return 0;
}
int increment(){
num++;
return (num);
}
What will be the output of the following program on GCC?
Practice Declarations and Initializations –
What will be the output of the following program on GCC?
#include <stdio.h>
void val();
int i=10,j=20,k=30;
int main(){
int i=1,j=2,k=3;
printf("i=%d j=%d k=%d
",i,j,k);
val();
return 0;
}
void val(){
printf("i=%d j=%d k=%d
",i,j,k);
}