Point out the error in the program.
#include<stdio.h>
int main()
{
const int k= int *const q=&k;
printf("%d", *q);
return}
Point out the error in the program.
#include<stdio.h>
#define MAX
int main()
{
char mybuf[] = "India";
char yourbuf[] = "BIX";
char *const ptr = mybuf;
*ptr = 'a';
ptr = yourbuf;
return}
Point out the error in the program.
#include<stdio.h>
#define MAX
int main()
{
char mybuf[] = "India";
char yourbuf[] = "BIX";
char const *ptr = mybuf;
*ptr = 'a';
ptr = yourbuf;
return}
Point out the error in the program (in Turbo-C).
#include<stdio.h>
#define MAX
int main()
{
const int max= char array[max];
char string[MAX];
array[= string[= 'A';
printf("%c %c\n", array[0], string[0]);
return}
Point out the error in the program.
#include<stdio.h>
const char *fun();
int main()
{
*fun() = 'A';
return}
const char *fun()
{
return "Hello";
}
Point out the error in the program.
#include<stdio.h>
#include<stdlib.h>
union employee
{
char name[15];
int age;
float salary;
};
const union employee e
int main()
{
strcpy(e1.name, "K");
printf("%s", e1.name);
e1.age= printf("%d", e1.age);
printf("%f", e1.salary);
return}
Point out the error in the program.
#include<stdio.h>
const char *fun();
int main()
{
char *ptr = fun();
return}
const char *fun()
{
return "Hello";
}
Point out the error in the program.
#include<stdio.h>
int main()
{
const int x;
x= printf("%d\n", x);
return}
What will be the output of the program?
#include<stdio.h>
int main()
{
const char *s = "";
char str[] = "Hello";
s = str;
while(*s)
printf("%c", *s++);
return}
What will be the output of the program?
#include<stdio.h>
int main()
{
int y= const int x=y;
printf("%d\n", x);
return}
What will be the output of the program?
#include<stdio.h>
int get();
int main()
{
const int x = get();
printf("%d", x);
return}
int get()
{
return}
What will be the output of the program?
#include<stdio.h>
#include<stdlib.h>
union employee
{
char name[15];
int age;
float salary;
};
const union employee e
int main()
{
strcpy(e1.name, "K");
printf("%s %d %f", e1.name, e1.age, e1.salary);
return}
What will be the output of the program (in Turbo C)?
#include<stdio.h>
int fun(int *f)
{
*f = return}
int main()
{
const int arr[= {5};
printf("Before modification arr[= %d", arr[3]);
fun(&arr[3]);
printf("\nAfter modification arr[= %d", arr[3]);
return}
What will be the output of the program?
#include<stdio.h>
int fun(int **ptr);
int main()
{
int i= const int *ptr = &i;
fun(&ptr);
return}
int fun(int **ptr)
{
int j = int *temp = &j;
printf("Before changing ptr = %5x\n", *ptr);
const *ptr = temp;
printf("After changing ptr = %5x\n", *ptr);
return}
What will be the output of the program?
#include<stdio.h>
int main()
{
const int i= printf("%d\n", i++);
return}
What will be the output of the program?
#include<stdio.h>
int main()
{
const int x= const int *ptrx;
ptrx = &x;
*ptrx = printf("%d\n", x);
return}
What will be the output of the program?
#include<stdio.h>
int main()
{
const c = -
const int d =
printf("%d, %d\n", c, d);
return
}
What will be the output of the program in TurboC?
#include<stdio.h>
int fun(int **ptr);
int main()
{
int i=j= const int *ptr = &i;
printf(" i = %5X", ptr);
printf(" ptr = %d", *ptr);
ptr = &j;
printf(" j = %5X", ptr);
printf(" ptr = %d", *ptr);
return}