Explain this code.
#include <stdio.h>
void f1(int *k)
{
*k = *k + 10;
}
main ( ){
int i;
i = 0;
printf (" The value of i before call %d \n", i);
f1 (&i);
printf (" The value of i after call %d \n", i);
}
Answer Posted / vivek
it will produce an error as constant cant be added to a pointer
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
Can we declare function inside main?
What is hashing in c language?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
What are the applications of c language?
What does a function declared as pascal do differently?
how to capitalise first letter of each word in a given string?
What are the 32 keywords in c?
What is wrong in this statement? scanf(“%d”,whatnumber);
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
Tell us bitwise shift operators?
What is the benefit of using an enum rather than a #define constant?