What will be the output of the following C code?
#include <stdio.h>
void foo(const int *);
int main()
{
const int i = 10;
printf("%d ", i);
foo(&i);
printf("%d", i);
}
void foo(const int *i)
{
*i = 20;
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
const int i = 10;
int *ptr = &i;
*ptr = 20;
printf("%d\n", i);
return 0;
}
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What will be the output of the following C code?
#include <stdio.h>
int main()
{
j = 10;
printf("%d\n", j++);
return 0;
}
Will the following C code compile without any error?
#include <stdio.h>
int main()
{
for (int k = 0; k < 10; k++);
return 0;
}
Will the following C code compile without any error?
#include <stdio.h>
int main()
{
int k;
{
int k;
for (k = 0; k < 10; k++);
}
}
Which of the following declaration is not supported by C?
Which of the following format identifier can never be used for the variable var?
#include <stdio.h>
int main()
{
char *var = "Advanced Training in C by Sanfoundry.com";
}
Which keyword is used to prevent any changes in the variable within a C program?
Which of the following is not a pointer declaration?
10 videos|13 docs|15 tests
|
10 videos|13 docs|15 tests
|