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 / pooja agarwal
10
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
List a few unconditional control statement in c.
Why is it that not all header files are declared in every C program?
What are reserved words?
What is the difference between near, far and huge pointers?
How many types of sorting are there in c?
What is the description for syntax errors?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
How is a null pointer different from a dangling pointer?
How do we make a global variable accessible across files? Explain the extern keyword?
What is the difference between malloc() and calloc()?
What is the meaning of && in c?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
How can you access memory located at a certain address?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
Write the control statements in C language