Which of the following C statements is syntactically correct ?
![]()
Practice Control Instructions – Which of the following C statements is syntactically correct ?
![]()
Practice Control Instructions – Which of the following C statements is syntactically correct ?
![]()
Practice Expressions – What will be the output of the below C program.
#include
int main()
{
int i = 0;
for(i = 3; i < 15; i + = 3)
{
print{("%d", i);
++i;
}
return 0;
} ![]()
Practice Arrays – Arrays can be initialized provided they are
FUNC ![]()
Practice Memory Allocation – Output of the code?
FUNC (int *p)
{
p = (int *)malloc(100);
printf("p:%x",p);
}
int main( )
{
int *ptr;
FUNC(ptr);
printf("Ptr:%x",ptr);
return 0;
} ![]()
Practice Command Line Arguments – Which is the correct way of declaring main() when it receives comrnand line arguments ?
![]()
Practice Strings – What will be the output of the following program?
#include
int main()
{
char *s = "Hello";
printf("%s",(s+1));
return 0;
} ![]()
Practice Basic Concept – To scan float a and double b, which scanf() statement will be used?
![]()
Practice Complicated Declarations – Interpret the given declaration
char ( * ( f ( )) [ ])()
![]()
Practice Basic Concept – To print out a and b given below, which printf() statement will be used ?
float a = 3.14;
double b = 3.14;
![]()
Practice Input / Output – If a file contains the line “I am an Indian
” then on reading this line into the array str using fgets().
what would str contain?
![]()
Practice Basic Concept – What does main return on successful execution?
![]()
Practice Declarations and Initializations – What is the correct way to round off x, a float, to an int value?
![]()
Practice Command Line Arguments – What will be the output of the following program?
main(int argc,char *argv[])
{
printf((argc > 1 ? "%c" : "%c",*++argv);
}If the i/p string is “GESL Bangalore”)
![]()
Practice Complicated Declarations – How do u declare a pointer to an array of pointers to int?
![]()
Practice C Preprocessor – What will be the output of the following program?
#define SIZE sizeof(int)
main(){ int i=-1;
if( i < SIZE )
printf("True
");
else
printf("False
");
}